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