-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/aws_cloudwatch_log_group: Remove tags restrictions in AWS GovCloud (US) and AWS China #5175
Conversation
…vCloud (US) and AWS China
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM 👍
} | ||
|
||
if !meta.(*AWSClient).IsChinaCloud() && !meta.(*AWSClient).IsGovCloud() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this also affects China - does this fix work in that DC too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% positive since we cannot test AWS China directly (at the moment), but there are some reasons why its likely okay. Its probably important to note that we do not have any access or acceptance testing in place for AWS China and its support is currently best effort based on bug reports. We should probably include this in our documentation/README. 🤔
It doesn't appear this was ever explicitly requested to be restricted like this as far as I can tell. I did some Git spelunking and I couldn't find an associated reason why AWS China was being included (although probably just for "good measure" when the GovCloud logic was added):
I don't see any particular announcement in the AWS China What's New blog for this CloudWatch Log resource tagging, but the GovCloud blog didn't seem to announce it either unless its hidden under another post.
The AWS China CloudWatch documentation points to the regular CloudWatch documentation, which does not list any restrictions in its tagging section.
In the end, I think its worth switching the logic (at the risk of a regression). If the resource tagging is still not supported, we can get a bug report the appropriate error message and can switch it to a more future-proof solution based on that handling rather than depending on a hardcoded conditional that has to be updated in the code.
This has been released in version 1.28.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
At some point (sorry, I cannot find the relevant blog post if there was one), AWS GovCloud (US) started supporting resource tags with CloudWatch Log groups.
Changes proposed in this pull request:
aws_cloudwatch_log_group
resourcetags
handling restrictions in AWS GovCloud (US) and AWS ChinaIsGovCloud()
functionexists
boolean return valueOutput from acceptance testing (AWS Commercial):
Output from acceptance testing (AWS GovCloud (US)):