OpenSearch Service
Terraform module to create AWS OpenSearch resources
Inputs
40 / 47
access_policiesoptionalstringIAM policy document specifying the access policies for the domain. Required if `create_access_policy` is `false`
nullaccess_policy_override_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`
[]access_policy_source_policy_documentsoptionallist(string)List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s
[]access_policy_statementsoptionalanyA map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage
{}advanced_optionsoptionalmap(string)Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing Terraform to want to recreate your Elasticsearch domain on every apply
{}advanced_security_optionsoptionalanyConfiguration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html)
{…}aiml_optionsoptionalobject({ natural_language_query_generation_options = optional(object({ desired_s…Configuration block for AI/ML options including Natural Language Query Generation, S3 Vectors, and Serverless Vector Acceleration
nullauto_tune_optionsoptionalanyConfiguration block for the Auto-Tune options of the domain
{…}cloudwatch_log_group_classoptionalstringSpecified the log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS
nullcloudwatch_log_group_kms_key_idoptionalstringIf a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html)
nullcloudwatch_log_group_retention_in_daysoptionalnumberNumber of days to retain log events
60cloudwatch_log_group_skip_destroyoptionalboolSet to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state
nullcloudwatch_log_resource_policy_nameoptionalstringName of the resource policy for OpenSearch to log to CloudWatch
nullcluster_configoptionalanyConfiguration block for the cluster of the domain
{…}cognito_optionsoptionalanyConfiguration block for authenticating Kibana with Cognito
{}createoptionalboolDetermines whether resources will be created (affects all resources)
truecreate_access_policyoptionalboolDetermines whether an access policy will be created
truecreate_cloudwatch_log_groupsoptionalboolDetermines whether log groups are created
truecreate_cloudwatch_log_resource_policyoptionalboolDetermines whether a resource policy will be created for OpenSearch to log to CloudWatch
truecreate_saml_optionsoptionalboolDetermines whether SAML options will be created
falsecreate_security_groupoptionalboolDetermines if a security group is created
truedeployment_strategy_optionsoptionalobject({ deployment_strategy = string })Configuration block for deployment strategy options
nulldomain_endpoint_optionsoptionalanyConfiguration block for domain endpoint HTTP(S) related options
{…}domain_nameoptionalstringName of the domain
""ebs_optionsoptionalanyConfiguration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/)
{…}enable_access_policyoptionalboolDetermines whether an access policy will be applied to the domain
trueencrypt_at_restoptionalanyConfiguration block for encrypting at rest
{…}engine_versionoptionalstringVersion of the OpenSearch engine to use. Must follow format 'OpenSearch_X.Y' (e.g., 'OpenSearch_2.11')
nullidentity_center_optionsoptionalobject({ enabled_api_access = optional(bool) identity_center_instance_arn = opti…Configuration block for enabling and managing IAM Identity Center integration within a domain
nullip_address_typeoptionalstringThe IP address type for the endpoint. Valid values are ipv4 and dualstack
nulllog_publishing_optionsoptionalanyConfiguration block for publishing slow and application logs to CloudWatch Logs. This block can be declared multiple times, for each log_type, within the same resource
[…]node_to_node_encryptionoptionalanyConfiguration block for node-to-node encryption options
{…}off_peak_window_optionsoptionalanyConfiguration to add Off Peak update options
{…}outbound_connectionsoptionalanyMap of AWS OpenSearch outbound connections to create
{}package_associationsoptionalmap(string)Map of package association IDs to associate with the domain
{}regionoptionalstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration
nullsaml_optionsoptionalanySAML authentication options for an AWS OpenSearch Domain
{}security_group_descriptionoptionalstringDescription of the security group created
nullsecurity_group_nameoptionalstringName to use on security group created
nullsecurity_group_rulesoptionalanySecurity group ingress and egress rules to add to the security group created
{}All 47 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 7 are in the source.
Outputs
14
cloudwatch_logsMap of CloudWatch log groups created and their attributes
domain_arnThe Amazon Resource Name (ARN) of the domain
domain_dashboard_endpointDomain-specific endpoint for Dashboard without https scheme
domain_dashboard_endpoint_v2V2 domain endpoint for Dashboard that works with both IPv4 and IPv6 addresses, without https scheme
domain_endpointDomain-specific endpoint used to submit index, search, and data upload requests
domain_endpoint_v2V2 domain endpoint that works with both IPv4 and IPv6 addresses, used to submit index, search, and data upload requests
domain_endpoint_v2_hosted_zone_idDual stack hosted zone ID for the domain.
domain_idThe unique identifier for the domain
domain_nameThe name of the domain
outbound_connectionsMap of outbound connections created and their attributes
package_associationsMap of package associations created and their attributes
security_group_arnAmazon Resource Name (ARN) of the security group
security_group_idID of the security group
vpc_endpointsMap of VPC endpoints created and their attributes
What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.