Skip to content

Commit

Permalink
provider/aws: Fix ES Domain acceptance tests (#13160)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored Mar 29, 2017
1 parent 4b8e235 commit 75979af
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions builtin/providers/aws/resource_aws_elasticsearch_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource {
"volume_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
18 changes: 17 additions & 1 deletion builtin/providers/aws/resource_aws_elasticsearch_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand All @@ -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"
Expand All @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 75979af

Please sign in to comment.