Skip tag operations on cloudwatch logs in govcloud partition.

This commit is contained in:
Joshua Carp 2017-03-03 10:32:04 -05:00
parent 452f47ce8c
commit 1bde07f496
No known key found for this signature in database
GPG Key ID: CA7574E5483AB09D
1 changed files with 7 additions and 5 deletions

View File

@ -91,11 +91,13 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{})
d.Set("retention_in_days", lg.RetentionInDays) d.Set("retention_in_days", lg.RetentionInDays)
} }
if meta.(*AWSClient).partition != "aws-us-gov" {
tags, err := flattenCloudWatchTags(d, conn) tags, err := flattenCloudWatchTags(d, conn)
if err != nil { if err != nil {
return err return err
} }
d.Set("tags", tags) d.Set("tags", tags)
}
return nil return nil
} }
@ -152,7 +154,7 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{
} }
} }
if d.HasChange("tags") { if meta.(*AWSClient).partition != "aws-us-gov" && d.HasChange("tags") {
oraw, nraw := d.GetChange("tags") oraw, nraw := d.GetChange("tags")
o := oraw.(map[string]interface{}) o := oraw.(map[string]interface{})
n := nraw.(map[string]interface{}) n := nraw.(map[string]interface{})