When a stack is deployed containing an "AWS::ApiGateway::VpcLink" resource which references an "AWS::ElasticLoadBalancingV2::LoadBalancer" created in the same stack via "Ref", the VpcLink resource proceeds to provision before the LoadBalancer resource has returned a success.
Adding an explicit dependency solves this.
Issue: resource not respecting implicit dependency. Results in failed deployment "Failed to stabilize Vpc Link with id * Status Message NLB is not in active state. If you recently created this NLB, please wait for it to become active and try again.."
Expected Behavior
Deploy template containing AWS::ApiGateway::VpcLink which implicitly refers to an AWS::ElasticLoadBalancingV2::LoadBalancer resource. CloudFormation waits for CREATE_COMPLETE before from LoadBalancer before starting VpcLink CREATE_IN_PROGRESS.
Observed Behavior
CloudFormation starts the LoadBalancer resource deployment then starts the VpcLink deployment before receiving success. This creates a race condition where often stack deployment fails. Implicit dependency is not observed.
Name of the resource
AWS::ApiGateway::VpcLink
Resource Name
AWS::ElasticLoadBalancingV2::LoadBalancer
Issue Description
When a stack is deployed containing an "AWS::ApiGateway::VpcLink" resource which references an "AWS::ElasticLoadBalancingV2::LoadBalancer" created in the same stack via "Ref", the VpcLink resource proceeds to provision before the LoadBalancer resource has returned a success.
Adding an explicit dependency solves this.
Issue: resource not respecting implicit dependency. Results in failed deployment "Failed to stabilize Vpc Link with id * Status Message NLB is not in active state. If you recently created this NLB, please wait for it to become active and try again.."
Expected Behavior
Deploy template containing AWS::ApiGateway::VpcLink which implicitly refers to an AWS::ElasticLoadBalancingV2::LoadBalancer resource. CloudFormation waits for CREATE_COMPLETE before from LoadBalancer before starting VpcLink CREATE_IN_PROGRESS.
Observed Behavior
CloudFormation starts the LoadBalancer resource deployment then starts the VpcLink deployment before receiving success. This creates a race condition where often stack deployment fails. Implicit dependency is not observed.
Test Cases
SAMPLE TEMPLATE: