(apigateway): auto-deployment doesn't work #16324
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
needs-triage
This issue or PR still needs to be triaged.
According to AWS CDK Documentation, all ApiGateway changes regarding adding new methods should be by default automatically deployed to the default prod stage.
This works fine for the case where the ApiGateway is managed in the same CDK stack that the methods/resources are being updated. It seems it doesn't work however when the ApiGateway is imported via
Fn.importValue
by Arn from another stack that is managing it.In our case, we have the following micro-service repository layout:
infra
repository that contains several CDK stacks, one per directory, that are self-isolatedThe purpose of this repository is to hold all "shared" components of the infrastructure (like SQS, DynamoDB, ApiGW) to avoid dependency cycles between the components.
This way we know that the infra changes need to be deployed first if there is a new shared component that is added to the architecture stack.
Inside the CDK of that component, the API GW methods are added like this:
where the ApiContruct looks similarly to this:
and MethodConstruct:
What did you expect to happen?
API Gateway stage to be automatically deployed to /prod.
What actually happened?
Resources are visible in the ApiGW in the UI, but they are not deployed to /prod stage automatically.
Environment
CDK 1.119
CodePipelines
Do you have any suggestions how can we debug what is the reason this doesn't work like comparing the generated CF templates?
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: