Skip to content
Discussion options

You must be logged in to vote

Typical. Spent days trying to work round the issue only to come up with the solution a few hours after posting this. Oh well. Here we go:

Use NestedStack stacks with CfnParameter (rather than let CDK try to handle the variables internally). That gives you a CloudFormation reference for them.

Example (continued from above)

import { Construct } from 'constructs'
import CdkHelper from '../helpers/cdk-helper'

import * as apigateway from 'aws-cdk-lib/aws-apigateway'
import { CfnParameter, NestedStack, NestedStackProps } from 'aws-cdk-lib'


export interface CustomerGatewayProps extends NestedStackProps {
    readonly prefix: string
}

export class CustomerGateway extends NestedStack {
    pub…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@andyRokit
Comment options

@davidsteed1
Comment options

@davidsteed1
Comment options

@davidsteed1
Comment options

@u7w4qv5PiZ5NOXMM69r5vPeLl4GZ4KzycIk1eKX
Comment options

Answer selected by andyRokit
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants