Skip to content

Commit

Permalink
Skip tag operations on cloudwatch logs in govcloud partition.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarp committed Mar 3, 2017
1 parent 7727707 commit 55000e4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions resource_aws_cloudwatch_log_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{})
d.Set("retention_in_days", lg.RetentionInDays)
}

tags, err := flattenCloudWatchTags(d, conn)
if err != nil {
return err
if meta.(*AWSClient).partition != "aws-us-gov" {
tags, err := flattenCloudWatchTags(d, conn)
if err != nil {
return err
}
d.Set("tags", tags)
}
d.Set("tags", tags)

return nil
}
Expand Down Expand Up @@ -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")
o := oraw.(map[string]interface{})
n := nraw.(map[string]interface{})
Expand Down

0 comments on commit 55000e4

Please sign in to comment.