diff --git a/builtin/providers/aws/resource_aws_elasticsearch_domain.go b/builtin/providers/aws/resource_aws_elasticsearch_domain.go index 8f2d6c9c9fda..3b1640dd8058 100644 --- a/builtin/providers/aws/resource_aws_elasticsearch_domain.go +++ b/builtin/providers/aws/resource_aws_elasticsearch_domain.go @@ -133,6 +133,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } @@ -274,6 +275,22 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} d.Set("arn", *ds.ARN) + // get tags + type ListTagsRequest struct { + ARN string + } + + req := ListTagsRequest{ + ARN: *ds.ARN + } + + resp, err := elasticsearch.ListTags(req) + if err != nil { + return err + } + + d.Set("tags", resp) + return nil } @@ -353,6 +370,12 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface return err } + // if err := setTagsR53(conn, d, "hostedzone"); err != nil { + // return err + // } else { + // d.SetPartial("tags") + // } + return resourceAwsElasticSearchDomainRead(d, meta) }