docs: Avoid DB proxy diffs for unsupported AZs #40498
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.
Description
This PR updates the documentation to address an issue where Terraform perpetually shows a diff and recreates an RDS Proxy when one or more specified subnets are in an Availability Zone (AZ) that does not support DB proxies.
Problem
When creating an RDS Proxy, the proxy is successfully created but only includes subnets from supported AZs. If one of the specified subnets is in an unsupported AZ:
supported_1
andsupported_2
instead of the expected three subnets).Root Causes
Workarounds
Since the problem cannot be fully resolved at this time, this PR provides documentation updates with practical workarounds:
aws_availability_zones
data source to dynamically filter out unsupported AZs when defining subnets.lifecycle
ignore_changes
meta-argument to suppress Terraform's diff detection for thevpc_subnet_ids
argument.Limitations
ignore_changes
prevents Terraform from managing updates tovpc_subnet_ids
, which could lead to configuration drift.Future Improvements
The best long-term solution would be for the AWS API to return an error when unsupported AZs are included, allowing Terraform to fail fast during resource creation. However, this is not currently possible due to API behavior.
Relations
Closes #17781
Closes #23446
References
Output from Acceptance Testing