Replies: 1 comment
-
I don't think this is possible unfortunately. The cloud assembly is already synthesized and ready to go, implementing a way to adjust some aspects of it does sound against its design to me. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
The end goal I'm trying to achieve is: with a previously synthesised (
cdk synth
) CDK Cloud Assembly (cdk.out
) I want to go and deploy it to several stages, each with their own environment config.I'm familiar with how CDK pipelines can do this with an all-in-one by binding an application stack's construct to a stage via
pipeline.addStage
:But this doesn't allow for consuming a CDK Cloud Assembly artefact.
Previous attempts/ideas
Use a Stage construct:
I was hoping that I could read a Cloud Assembly from a local directory as PoC, but don't know how to derive a
cloudAssemblyArtifact
from our importedwebstaticAssembly
below (or if it's even possible?):Consume the Cloud Formation template:
The Cloud Assembly contains the Cloud Formation template (amongst other assets), I was thinking I could potentially define a Stack that is derived from an applications CF template; this however felt wrong, and asset management was getting tricky. I must admit I stopped exploring this path early as I felt I was bending a Cloud Assembly to something it wasn't built for (and defeating the purpose of building into a Cloud Assembly in the first place).
Straight from CLI whilst utilising Cloud Formation Parameters:
I'm familiar with deploying an already synthesised application from the CLI like so:
cdk --app ./my-cloud-assembly ls
And hoped it could be combined with specified parameters (e.g an stage name); however unresolved tokens in a Construct's ID isn't allowed (and I didn't find any escape hatches to get around it):
Cannot use tokens in construct ID: ${Token[TOKEN.238]}
The question
Is what I am trying to do possible? Have I overlooked something entirely?
Beta Was this translation helpful? Give feedback.
All reactions