chalice icon indicating copy to clipboard operation
chalice copied to clipboard

Use api_gateway_stage for managing APIGW stages with Terraform instead of api_gateway_deployment stage_name

Open jrbeilke opened this issue 3 years ago • 1 comments

Attempting to enhance some of the features/functionality of Chalice with Terraform during our deploys, but we're limited because Chalice does not expose the API Gateway stage (ie. for associating a WAF ACL with APIGW stage)

The AWS provider for Terraform has been updated and also no longer recommends using stage_name in api_gateway_deployment to manage API Gateway stages as Chalice does today.

jrbeilke avatar Nov 16 '21 21:11 jrbeilke

Came up with a workaround for now by wrapping the chalice.tf.json with some additional Terraform that can grab the stage-name and generate an ARN for the APIGW stage ie.

"${aws_api_gateway_rest_api.rest_api.arn}/stages/${aws_api_gateway_deployment.rest_api.stage_name}"

jrbeilke avatar Jan 13 '22 15:01 jrbeilke