diff --git a/builtin/providers/aws/resource_aws_elasticsearch_domain.go b/builtin/providers/aws/resource_aws_elasticsearch_domain.go index 7a8753efd..c931b119e 100644 --- a/builtin/providers/aws/resource_aws_elasticsearch_domain.go +++ b/builtin/providers/aws/resource_aws_elasticsearch_domain.go @@ -83,6 +83,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { "volume_type": { Type: schema.TypeString, Optional: true, + Computed: true, }, }, }, diff --git a/builtin/providers/aws/resource_aws_elasticsearch_domain_policy_test.go b/builtin/providers/aws/resource_aws_elasticsearch_domain_policy_test.go index 76f650f6c..5efd3eb99 100644 --- a/builtin/providers/aws/resource_aws_elasticsearch_domain_policy_test.go +++ b/builtin/providers/aws/resource_aws_elasticsearch_domain_policy_test.go @@ -85,6 +85,13 @@ func testAccESDomainPolicyConfig(randInt int, policy string) string { resource "aws_elasticsearch_domain" "example" { domain_name = "tf-test-%d" elasticsearch_version = "2.3" + cluster_config { + instance_type = "t2.micro.elasticsearch" + } + ebs_options { + ebs_enabled = true + volume_size = 10 + } } resource "aws_elasticsearch_domain_policy" "main" { diff --git a/builtin/providers/aws/resource_aws_elasticsearch_domain_test.go b/builtin/providers/aws/resource_aws_elasticsearch_domain_test.go index ed96dcd0d..e5bf282de 100644 --- a/builtin/providers/aws/resource_aws_elasticsearch_domain_test.go +++ b/builtin/providers/aws/resource_aws_elasticsearch_domain_test.go @@ -96,7 +96,7 @@ func TestAccAWSElasticSearchDomain_complex(t *testing.T) { }) } -func TestAccAWSElasticSearch_tags(t *testing.T) { +func TestAccAWSElasticSearchDomain_tags(t *testing.T) { var domain elasticsearch.ElasticsearchDomainStatus var td elasticsearch.ListTagsOutput ri := acctest.RandInt() @@ -198,6 +198,10 @@ func testAccESDomainConfig(randInt int) string { return fmt.Sprintf(` resource "aws_elasticsearch_domain" "example" { domain_name = "tf-test-%d" + ebs_options { + ebs_enabled = true + volume_size = 10 + } } `, randInt) } @@ -206,6 +210,10 @@ func testAccESDomainConfig_TagUpdate(randInt int) string { return fmt.Sprintf(` resource "aws_elasticsearch_domain" "example" { domain_name = "tf-test-%d" + ebs_options { + ebs_enabled = true + volume_size = 10 + } tags { foo = "bar" @@ -220,6 +228,10 @@ func testAccESDomainConfig_complex(randInt int) string { resource "aws_elasticsearch_domain" "example" { domain_name = "tf-test-%d" + cluster_config { + instance_type = "r3.large.elasticsearch" + } + advanced_options { "indices.fielddata.cache.size" = 80 } @@ -248,6 +260,10 @@ func testAccESDomainConfigV23(randInt int) string { return fmt.Sprintf(` resource "aws_elasticsearch_domain" "example" { domain_name = "tf-test-%d" + ebs_options { + ebs_enabled = true + volume_size = 10 + } elasticsearch_version = "2.3" } `, randInt)