mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-14 04:01:09 -04:00
1.1 KiB
1.1 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_elasticsearch_domain | docs-aws-resource-elasticsearch-domain | Provides an ElasticSearch Domain. |
aws_elasticsearch_domain_policy
Allows setting policy to an ElasticSearch domain while referencing domain attributes (e.g. ARN)
Example Usage
resource "aws_elasticsearch_domain" "example" {
domain_name = "tf-test"
elasticsearch_version = "2.3"
}
resource "aws_elasticsearch_domain_policy" "main" {
domain_name = "${aws_elasticsearch_domain.example.domain_name}"
access_policies = <<POLICIES
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "es:*",
"Principal": "*",
"Effect": "Allow",
"Condition": {
"IpAddress": {"aws:SourceIp": "127.0.0.1/32"}
},
"Resource": "${aws_elasticsearch_domain.example.arn}"
}
]
}
POLICIES
}
Argument Reference
The following arguments are supported:
domain_name- (Required) Name of the domain.access_policies- (Optional) IAM policy document specifying the access policies for the domain