Open anneadb opened 10 months ago
I think https://github.com/aws/aws-cdk/issues/21682 may be related
I can't reproduce this.
Are you able to print it in the CfnOutput like this?
new CfnOutput(this, 'SelectedSubnetIds', { value: appSubnetGroupSelections.subnetIds.join(',') })
And see the result like this?
Outputs:
demo.SelectedSubnetIds = subnet-071c85610846aa9c0,subnet-0ef7ac49e1edb06e4,subnet-0e2177a10a166f87d
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Hi @pahud ,
yes, if I remove the StringListParameter and instead add the CfnOutput I can successfully run cdk diff
and cdk synth
:
new cdk.CfnOutput(this, "SelectedSubnetIds", {
value: appSubnetGroupSelections.subnetIds.join(","),
})
// new cdk.aws_ssm.StringListParameter(this, "VpcParamSubnets", {
// parameterName: "/iac/vpc/appSubnetIds",
// stringListValue: appSubnetGroupSelections.subnetIds,
// })
From the synth I see:
Outputs:
SelectedSubnetIds:
Value: subnet-12345someid,subnet-12345someid,subnet-12345someid
Now this is really strange: If I add both the CfnOutput and StringListParameter then I can also synth the stack successfully. I have no idea why?
But in another project I get the same error message in a completely different setup: I have three stacks in my app, stacks 1 and 2 are only deployed to one account but stack 3 is also deployed to other accounts. Stack 1 contains a StringListParameter. Whenever I try to deploy stack 3 in another account from stack 1 I get the same error message from above. If I uncomment stack 1 and 2 from the app then I can deploy stack 3 successfully. Could this be another hint for the source of the issue?
I found this comment https://stackoverflow.com/a/73249828/10829644 indicating that sometime the cdk.context.json
could cause issues with deployment. Could that be something?
I tried removing this file but then none of my existing stacks sync anymore.
Hi @pahud ,
any ideas for what else I can test? I am still seeing this issue and therefore cannot store any string lists - which would be really useful.
Describe the bug
I added a StringListParameter to my existing Stack and suddenly get the following error:
Here is the code I added:
Expected Behavior
Successfully synth and deploy stack.
Current Behavior
Cannot synth or deploy stack.
Reproduction Steps
For some reason this error only occurs in some AWS accounts but not in others so it may be hard to reproduce. We roll out this stack in 8 different accounts and I currently cannot tell why it fails in one account but not the others.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.103.1
Framework Version
No response
Node.js Version
v18.17.0
OS
MacOS Sonoma 14.1
Language
TypeScript
Language Version
No response
Other information
No response