provider: Remove hardcoded AWS China handling #7654
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The usage of
IsChinaCloud()
(and previouslyIsGovCloud()
) represented the first iteration of trying to support the 3 public AWS partitions when they offered differing capabilities due to running different service API versions. While this approach of checking the AWS partition provides an immediate fix for these situations, it does not automatically handle if/when those new capabilities are enabled.In newer iterations of this handling, we attempt to simply ignore read errors based on specific error messages, like
UnsupportedOperation
and passthrough any create/update errors. See https://github.com/terraform-providers/terraform-provider-aws/pull/3794/files for an example of this.Here we introduce the potentially breaking change of removing the AWS China protections in the
aws_instance
andaws_s3_bucket_object
resources to further discourage the usage of this approach. Should any issues arise in AWS China from these removals, we will implement the error-based approach going forward. It is entirely possible that both EC2 Instance tagging on creation and S3 Object tagging is supported now in that partition though given both have been supported in AWS GovCloud for an extended period of time now.