Terraform AWS OpenSearch
OpenSearch domains with VPC placement, encryption at rest, node to node encryption, fine grained access control, audit logs, TLS enforcement, and snapshot configuration.
Controls enforced
These compliance controls are checked at terraform plan time.
- Elasticsearch domain error logging to CloudWatch Logs should be enabled(low effort)
- OpenSearch domains should have audit logging enabled(low effort)
- OpenSearch domains should have Cognito authentication enabled for Kibana(medium effort)
- OpenSearch domains should have at least three data nodes(low effort)
- OpenSearch domains should have encryption at rest enabled(low effort)
- OpenSearch domains should have fine-grained access control enabled(medium effort)
- OpenSearch domains should use HTTPS(low effort)
- OpenSearch domains should be in a VPC(medium effort)
- OpenSearch domains internal user database should be disabled(medium effort)
- OpenSearch domains should have logging to CloudWatch Logs enabled(low effort)
- OpenSearch domains node-to-node encryption should be enabled(low effort)
Quick start
See the Get Started guide and Registry Endpoints for details on how to customize the module for your requirements.
Migration from upstream
Already using terraform-aws-modules? Change only the source URL:
module "opensearch" {
source = "terraform-aws-modules/opensearch/aws"
version = "1.0"
}module "opensearch" {
source = "soc2.compliance.tf/terraform-aws-modules/opensearch/aws"
version = "1.0"
}Same arguments. Same outputs. Controls are checked at terraform plan. See the Migration Guide for step-by-step instructions.
Reversibility
No lock-in. Switch back by reverting the source URL:
module "opensearch" {
source = "terraform-aws-modules/opensearch/aws"
}Run terraform init -upgrade. Terraform state is unchanged — same resource addresses, same provider, no compliance.tf-specific resources. Controls you already applied remain in AWS.
Mapped compliance frameworks
Framework coverage
Which controls from this module are active under each framework endpoint.
● enforced by default · ○ not activated by this endpoint