Skip to content

resource/aws_api_gateway_deployment: Remove attributes that create stage #39958

Closed
@gdavison

Description

@gdavison

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 and #42244.

Remove attributes:

  • stage_name
  • stage_description
  • canary_settings
  • execution_arn
  • invoke_url

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)

  • aws_api_gateway_deployment

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

Labels

breaking-changeIntroduces a breaking change in current functionality; usually deferred to the next major release.enhancementRequests to existing resources that expand the functionality or scope.prioritizedPart of the maintainer teams immediate focus. To be addressed within the current quarter.service/apigatewayIssues and PRs that pertain to the apigateway service.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions