-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[apigateway] Add validations to the 'variables' property on Stage resource #3635
Comments
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Perhaps this should be documented as a known limitation if there's not enough interest to work on it? |
…esource (#25267) Closes #3635 From the original issue: API Gateway Stage variables must match a regex to be valid ([See the documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables)). When adding variables using CDK, this regex is not enforced, so it can synthesize a CloudFormation template that cannot be deployed. This PR fixes this issue by adding a validation that the strings match that regex along with a unit test for these changes. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
I'm submitting a ...
What is the current behavior?
API Gateway Stage variables must match a regex to be valid (See the documentation). When adding variables using CDK, this regex is not enforced, so it can synthesize a CloudFormation template that cannot be deployed.
CDK could throw an error if the variable values do not match the regex, preventing invalid templates from being created.
In a Blue/Green Deployment use case, I might have
blue
,green
andproduction
stages on my RestAPI, using Stage variables to define which Lambda alias each stage integrates with. It is currently illegal to use the$LATEST
alias in a Stage variable.Please tell us about your environment:
@aws-cdk/aws-apigateway@1.3.0
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
The text was updated successfully, but these errors were encountered: