hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.2k forks source link

resource/aws_api_gateway_deployment: Remove attributes that create stage #39958

Open gdavison opened 3 weeks ago

gdavison commented 3 weeks ago

Description

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:

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

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 3 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue