I'm currently trying a fetch a parameter for my pipeline through the CDK SSM Parameter library, however I seem to face a weird issue:
CfnParameter at 'nonProdAccountId.Parameter' should be created in the scope of a Stack, but no Stack found
However, I'm rather confident that I am fetching my Parameter value in the Scope of a Stack (the BackendPipelineStack
).
//cdk.ts aka my entrypoint
const app = new cdk.App()
...
new BackendPipelineStack(app, "BackendPipelineStack", {
nonProdAccountId: StringParameter.fromStringParameterName(app, "nonProdAccountId", "nonProdAccountId").stringValue,
apiStack,
commonInfraStack,
deploymentStack,
})
Am I missing something?
TIA