Module library

OpenSearch Service

Terraform module to create AWS OpenSearch resources

Version
Submodules
collection

Inputs

40 / 47
access_policiesoptionalstring

IAM policy document specifying the access policies for the domain. Required if `create_access_policy` is `false`

Defaultnull
access_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`

Default[]
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

Default[]
access_policy_statementsoptionalany

A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage

Default{}
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

Default{}
advanced_security_optionsoptionalany

Configuration block for [fine-grained access control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html)

Default{…}
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

Defaultnull
auto_tune_optionsoptionalany

Configuration block for the Auto-Tune options of the domain

Default{…}
cloudwatch_log_group_classoptionalstring

Specified the log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS

Defaultnull
cloudwatch_log_group_kms_key_idoptionalstring

If 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)

Defaultnull
cloudwatch_log_group_retention_in_daysoptionalnumber

Number of days to retain log events

Default60
cloudwatch_log_group_skip_destroyoptionalbool

Set 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

Defaultnull
cloudwatch_log_resource_policy_nameoptionalstring

Name of the resource policy for OpenSearch to log to CloudWatch

Defaultnull
cluster_configoptionalany

Configuration block for the cluster of the domain

Default{…}
cognito_optionsoptionalany

Configuration block for authenticating Kibana with Cognito

Default{}
createoptionalbool

Determines whether resources will be created (affects all resources)

Defaulttrue
create_access_policyoptionalbool

Determines whether an access policy will be created

Defaulttrue
create_cloudwatch_log_groupsoptionalbool

Determines whether log groups are created

Defaulttrue
create_cloudwatch_log_resource_policyoptionalbool

Determines whether a resource policy will be created for OpenSearch to log to CloudWatch

Defaulttrue
create_saml_optionsoptionalbool

Determines whether SAML options will be created

Defaultfalse
create_security_groupoptionalbool

Determines if a security group is created

Defaulttrue
deployment_strategy_optionsoptionalobject({ deployment_strategy = string })

Configuration block for deployment strategy options

Defaultnull
domain_endpoint_optionsoptionalany

Configuration block for domain endpoint HTTP(S) related options

Default{…}
domain_nameoptionalstring

Name of the domain

Default""
ebs_optionsoptionalany

Configuration block for EBS related options, may be required based on chosen [instance size](https://aws.amazon.com/elasticsearch-service/pricing/)

Default{…}
enable_access_policyoptionalbool

Determines whether an access policy will be applied to the domain

Defaulttrue
encrypt_at_restoptionalany

Configuration block for encrypting at rest

Default{…}
engine_versionoptionalstring

Version of the OpenSearch engine to use. Must follow format 'OpenSearch_X.Y' (e.g., 'OpenSearch_2.11')

Defaultnull
identity_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

Defaultnull
ip_address_typeoptionalstring

The IP address type for the endpoint. Valid values are ipv4 and dualstack

Defaultnull
log_publishing_optionsoptionalany

Configuration 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

Default[…]
node_to_node_encryptionoptionalany

Configuration block for node-to-node encryption options

Default{…}
off_peak_window_optionsoptionalany

Configuration to add Off Peak update options

Default{…}
outbound_connectionsoptionalany

Map of AWS OpenSearch outbound connections to create

Default{}
package_associationsoptionalmap(string)

Map of package association IDs to associate with the domain

Default{}
regionoptionalstring

Region where this resource will be managed. Defaults to the Region set in the provider configuration

Defaultnull
saml_optionsoptionalany

SAML authentication options for an AWS OpenSearch Domain

Default{}
security_group_descriptionoptionalstring

Description of the security group created

Defaultnull
security_group_nameoptionalstring

Name to use on security group created

Defaultnull
security_group_rulesoptionalany

Security group ingress and egress rules to add to the security group created

Default{}

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_logs

Map of CloudWatch log groups created and their attributes

domain_arn

The Amazon Resource Name (ARN) of the domain

domain_dashboard_endpoint

Domain-specific endpoint for Dashboard without https scheme

domain_dashboard_endpoint_v2

V2 domain endpoint for Dashboard that works with both IPv4 and IPv6 addresses, without https scheme

domain_endpoint

Domain-specific endpoint used to submit index, search, and data upload requests

domain_endpoint_v2

V2 domain endpoint that works with both IPv4 and IPv6 addresses, used to submit index, search, and data upload requests

domain_endpoint_v2_hosted_zone_id

Dual stack hosted zone ID for the domain.

domain_id

The unique identifier for the domain

domain_name

The name of the domain

outbound_connections

Map of outbound connections created and their attributes

package_associations

Map of package associations created and their attributes

security_group_arn

Amazon Resource Name (ARN) of the security group

security_group_id

ID of the security group

vpc_endpoints

Map 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.