Merge pull request #14319 from hashicorp/f-update-partition-check

provider/aws: Use helper methods for checking partition
This commit is contained in:
Jake Champlin 2017-05-09 12:30:07 -04:00 committed by GitHub
commit 4677aca349
1 changed files with 4 additions and 2 deletions

View File

@ -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
@ -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{})