question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[core] availabilityZones with account and region specified not working in nested stacks

See original GitHub issue

Availability zones are not resolved correctly for VPCs created in nested stacks. The value is not resolved and the dummyValue is returned. In the case of availabilityZones, the dummy value is ['dummy1a', 'dummy1b', 'dummy1c'].

Reproduction Steps

export class MyNestedStack extends cfn.NestedStack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.NestedStackProps) {
    super(scope, id, props);

    new ec2.Vpc(this, 'VPCA');
  }
}

Error Log

From CloudFormation:

Value (dummy1a) for parameter availabilityZone is invalid. 

Environment

  • CLI Version : 1.19.0
  • Framework Version: 1.19.0
  • OS : macOS
  • Language : TypeScript

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
cmckni3commented, Dec 31, 2019

For now, I was able to work around the issue by placing the following code into my NestedStack.

cdk.ContextProvider.getValue(scope, {
  provider: cxapi.AVAILABILITY_ZONE_PROVIDER,
  dummyValue: ['dummy1a', 'dummy1b', 'dummy1c'],
}).value;

N.B. it is pulling the context values from the parent stack using scope

1reaction
eladbcommented, Dec 31, 2019

@NetaNir is picking this up

Read more comments on GitHub >

github_iconTop Results From Across the Web

class NestedStack (construct) · AWS CDK
Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack. bundlingRequired, boolean, Indicates whether the ...
Read more >
StackSets concepts - Amazon CloudFormation - 亚马逊云科技
After you've defined a stack set, you can create, update, or delete stacks in the target accounts and Amazon Web Services Regions you...
Read more >
Multi-region Deployment with CloudFormation StackSets
AWS CloudFormation StackSets requires specific permissions to be able to deploy stacks in multiple AWS accounts across multiple AWS Regions.
Read more >
Qumulo Cloud Q on the AWS Cloud
Two Availability Zones: one for the Qumulo cluster and another that you could ... A provisioner EC2 instance (node), which automatically stops running...
Read more >
AWS CloudFormation StackSets and Nested Stacks
All resources are defined on the AWS CloudFormation template. ... If your application has cross-region and multi-accounts deployment requirements, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found