github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/elasticsearch_domain.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_elasticsearch_domain" 4 sidebar_current: "docs-aws-resource-elasticsearch-domain" 5 description: |- 6 Provides an ElasticSearch Domain. 7 --- 8 9 # aws\_elasticsearch\_domain 10 11 12 ## Example Usage 13 14 ``` 15 resource "aws_elasticsearch_domain" "es" { 16 domain_name = "tf-test" 17 elasticsearch_version = "1.5" 18 19 advanced_options { 20 "rest.action.multi.allow_explicit_index" = true 21 } 22 23 access_policies = <<CONFIG 24 { 25 "Version": "2012-10-17", 26 "Statement": [ 27 { 28 "Action": "es:*", 29 "Principal": "*", 30 "Effect": "Allow", 31 "Condition": { 32 "IpAddress": {"aws:SourceIp": ["66.193.100.22/32"]} 33 } 34 } 35 ] 36 } 37 CONFIG 38 39 snapshot_options { 40 automated_snapshot_start_hour = 23 41 } 42 43 tags { 44 Domain = "TestDomain" 45 } 46 } 47 ``` 48 49 ## Argument Reference 50 51 The following arguments are supported: 52 53 * `domain_name` - (Required) Name of the domain. 54 * `access_policies` - (Optional) IAM policy document specifying the access policies for the domain 55 * `advanced_options` - (Optional) Key-value string pairs to specify advanced configuration options. 56 * `ebs_options` - (Optional) EBS related options, see below. 57 * `cluster_config` - (Optional) Cluster configuration of the domain, see below. 58 * `snapshot_options` - (Optional) Snapshot related options, see below. 59 * `elasticsearch_version` - (Optional) The version of ElasticSearch to deploy. Defaults to `1.5` 60 * `tags` - (Optional) A mapping of tags to assign to the resource 61 62 **ebs_options** supports the following attributes: 63 64 * `ebs_enabled` - (Required) Whether EBS volumes are attached to data nodes in the domain 65 * `volume_type` - (Optional) The type of EBS volumes attached to data nodes. 66 * `volume_size` - The size of EBS volumes attached to data nodes. 67 **Required** if `ebs_enabled` is set to `true`. 68 * `iops` - (Optional) The baseline input/output (I/O) performance of EBS volumes 69 attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type. 70 71 **cluster_config** supports the following attributes: 72 73 * `instance_type` - (Optional) Instance type of data nodes in the cluster. 74 * `instance_count` - (Optional) Number of instances in the cluster. 75 * `dedicated_master_enabled` - (Optional) Indicates whether dedicated master nodes are enabled for the cluster. 76 * `dedicated_master_type` - (Optional) Instance type of the dedicated master nodes in the cluster. 77 * `dedicated_master_count` - (Optional) Number of dedicated master nodes in the cluster 78 * `zone_awareness_enabled` - (Optional) Indicates whether zone awareness is enabled. 79 80 **snapshot_options** supports the following attribute: 81 82 * `automated_snapshot_start_hour` - (Required) Hour during which the service takes an automated daily 83 snapshot of the indices in the domain. 84 85 86 ## Attributes Reference 87 88 The following attributes are exported: 89 90 * `arn` - Amazon Resource Name (ARN) of the domain. 91 * `domain_id` - Unique identifier for the domain. 92 * `endpoint` - Domain-specific endpoint used to submit index, search, and data upload requests. 93 94 ## Import 95 96 ElasticSearch domains can be imported using the `domain_name`, e.g. 97 98 ``` 99 $ terraform import aws_elasticsearch_domain.example domain_name 100 ```