-
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
[core] availabilityZones with account and region specified not working in nested stacks #5594
Comments
I tracked the issue down to reportMissingContext(report) {
if (this.nested) {
this.nestedStackParent.reportMissingContext(report);
} else {
this._missingContext.push(report);
}
} I think there's a bigger issue the code above won't solve but I will leave that to the CDK team. |
For now, I was able to work around the issue by placing the following code into my cdk.ContextProvider.getValue(scope, {
provider: cxapi.AVAILABILITY_ZONE_PROVIDER,
dummyValue: ['dummy1a', 'dummy1b', 'dummy1c'],
}).value;
|
@NetaNir is picking this up |
I tried doing as advised above: class MyNestedStack extends cfn.NestedStack {
} export class ParentStack extends Stack {
} |
@davidsteed I don’t see a vpc or any other resource that would need AZs in your stack. |
There isn't one. But I am getting the error
Nested stacks must be defined within scope of another non-nested stack
and I thought this was a work around for avoiding that.
I'm guessing not.
…On Tue, 7 Jan 2020 at 14:50, Chris McKnight ***@***.***> wrote:
@davidsteed <https://github.com/davidsteed> I don’t see a vpc or any
other resource that would need AZs in your stack.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5594?email_source=notifications&email_token=AECIHJ7N4OES7D4UXPZAFXTQ4SJDTA5CNFSM4KBS4MI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIJDLUA#issuecomment-571618768>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECIHJ7U7JH7XQBWSP62YOTQ4SJDTANCNFSM4KBS4MIQ>
.
|
What I am actually trying to do is register certificates in a stack in us-east-1 and use them in another stack in another region. |
I think that error is caused by It's usually I believe |
This is supposed to be fixed in the next release (soon!) |
new MyNestedStack(this, 'Nested1'); appears to work. The example https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-cloudformation needs to be changed to reflect this. It also does not compile -which made me suspicious anyway: |
Right, you would need to pass in props to the nested stack or specify it as optional in TypeScript as you have done with |
It sounds like you are trying to use a resource from a different stack in another region?
Notes about certificates:
https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html |
Awesome @eladb. I see 1.20.0 was released. |
For posterity: This works perfectly now without my workaround. I tried 1.40.0 and it works great. Also, nice to see the |
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 ofavailabilityZones
, the dummy value is['dummy1a', 'dummy1b', 'dummy1c']
.Reproduction Steps
Error Log
From CloudFormation:
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: