provider/aws: Fix ES Domain acceptance tests (#13160)

This commit is contained in:
Radek Simko 2017-03-29 18:07:11 +01:00 committed by GitHub
parent 4b8e235510
commit 75979afcb7
3 changed files with 25 additions and 1 deletions

View File

@ -83,6 +83,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource {
"volume_type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
},
},

View File

@ -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" {

View File

@ -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)