The resource type aws_api_gateway_deployment has three attributes, stage_name, stage_description, and canary_settings, that "silently" create a new stage that is not managed by Terraform, except that deleting the aws_api_gateway_deployment resource will also delete the stage. If stage_name refers to an existing stage, the stage will be modified.
We should prefer explicitly creating stages and assigning the deployment to the stage during creation or update. This will make it clear how the stage is managed. The ability to modify the stage using the deployment can also cause user confusion.
The attributes were deprecated in #39957.
Remove attributes:
[ ] stage_name
[ ] stage_description
[ ] canary_settings
Will also need to handle existing stages created by the aws_api_gateway_deployment. Possible implementation is to add a migrator that sets the stage ID as private state
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
The resource type
aws_api_gateway_deployment
has three attributes,stage_name
,stage_description
, andcanary_settings
, that "silently" create a new stage that is not managed by Terraform, except that deleting theaws_api_gateway_deployment
resource will also delete the stage. Ifstage_name
refers to an existing stage, the stage will be modified.We should prefer explicitly creating stages and assigning the deployment to the stage during creation or update. This will make it clear how the stage is managed. The ability to modify the stage using the deployment can also cause user confusion.
The attributes were deprecated in #39957.
Remove attributes:
stage_name
stage_description
canary_settings
Will also need to handle existing stages created by the
aws_api_gateway_deployment
. Possible implementation is to add a migrator that sets the stage ID as private stateAffected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
None