Skip to content

Commit

Permalink
provider/aws: Use helper methods for checking partition
Browse files Browse the repository at this point in the history
  • Loading branch information
grubernaut committed May 9, 2017
1 parent f862d73 commit 0285407
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 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 0285407

Please sign in to comment.