mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #14319 from hashicorp/f-update-partition-check
provider/aws: Use helper methods for checking partition
This commit is contained in:
commit
4677aca349
@ -109,7 +109,7 @@ 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" {
|
if !meta.(*AWSClient).IsChinaCloud() && !meta.(*AWSClient).IsGovCloud() {
|
||||||
tags, err := flattenCloudWatchTags(d, conn)
|
tags, err := flattenCloudWatchTags(d, conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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")
|
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{})
|
||||||
|
Loading…
Reference in New Issue
Block a user