Skip to content

Commit

Permalink
Merge pull request #14319 from hashicorp/f-update-partition-check
Browse files Browse the repository at this point in the history
provider/aws: Use helper methods for checking partition
  • Loading branch information
grubernaut authored May 9, 2017
2 parents 88c2e29 + 67ea7a3 commit 4677aca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builtin/providers/aws/resource_aws_cloudwatch_log_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{})
d.Set("retention_in_days", lg.RetentionInDays)
}

if meta.(*AWSClient).partition != "aws-us-gov" {
if !meta.(*AWSClient).IsChinaCloud() && !meta.(*AWSClient).IsGovCloud() {
tags, err := flattenCloudWatchTags(d, conn)
if err != nil {
return err
Expand Down Expand Up @@ -172,7 +172,9 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{
}
}

if meta.(*AWSClient).partition != "aws-us-gov" && d.HasChange("tags") {
restricted := meta.(*AWSClient).IsChinaCloud() || meta.(*AWSClient).IsGovCloud()

if !restricted && d.HasChange("tags") {
oraw, nraw := d.GetChange("tags")
o := oraw.(map[string]interface{})
n := nraw.(map[string]interface{})
Expand Down

0 comments on commit 4677aca

Please sign in to comment.