You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having difficulty understanding how CDK is able to build an ECS or Lambda application from source (or perhaps build) to deployment due to the chicken-egg nature of a single execution and I'm wondering what strategies others employ to make it successful.
For instance, I have a simple C# stack to:
Create an ECR repository
Create a PipelineProject (build)
Create a Pipeline with a stage to pull from source, build, and deploy
Create a Function (DockerImageFunction)
Here CDK deploys fail because an image won't exist.
I thought I could add the deploy stage in a separate stack, but Pipeline stages added in a different stack create circular reference errors.
I thought I could create the Function as inline code and move to an image in a separate stack, but Function types cannot be changed.
ECS will deploy without an image if the DesiredCount is set to zero, but Functions will not successfully deploy even if Reserved ConcurrentExecutions are zero.
I thought I could import the first stack's Pipeline and add the deployment stage, but Pipeline::FromArn results in an IPipeline, which is missing stage modifiers.
I thought I could add runtime flags to create the deployment stages and services/functions in a stack, but the behavior is hacky since a stack definition changes depending on arguments passed in rather than being static.
I technically can create and deploy a Function during the build process via CLI but the Function will not be managed by CloudFormation and will orphan on teardown.
I should state that my goal is to be able to deploy and tear down my company's infrastructure in one-to-many stack executions. All of the research / guides / advice I've seen require executing the stack iteratively (dependencies are always resolved prior to "next step"). These guides don't support an infrastructure defined in one stack.
Any input or advice would be greatly appreciated.
Notes:
discussions/23447 has a similar issue with adding stages to a pipeline without passing the pipeline
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having difficulty understanding how CDK is able to build an ECS or Lambda application from source (or perhaps build) to deployment due to the chicken-egg nature of a single execution and I'm wondering what strategies others employ to make it successful.
For instance, I have a simple C# stack to:
Create an ECR repository
Create a PipelineProject (build)
Create a Pipeline with a stage to pull from source, build, and deploy
Create a Function (DockerImageFunction)
Here CDK deploys fail because an image won't exist.
I thought I could add the deploy stage in a separate stack, but Pipeline stages added in a different stack create circular reference errors.
I thought I could create the Function as inline code and move to an image in a separate stack, but Function types cannot be changed.
ECS will deploy without an image if the DesiredCount is set to zero, but Functions will not successfully deploy even if Reserved ConcurrentExecutions are zero.
I thought I could import the first stack's Pipeline and add the deployment stage, but Pipeline::FromArn results in an IPipeline, which is missing stage modifiers.
I thought I could add runtime flags to create the deployment stages and services/functions in a stack, but the behavior is hacky since a stack definition changes depending on arguments passed in rather than being static.
I technically can create and deploy a Function during the build process via CLI but the Function will not be managed by CloudFormation and will orphan on teardown.
I should state that my goal is to be able to deploy and tear down my company's infrastructure in one-to-many stack executions. All of the research / guides / advice I've seen require executing the stack iteratively (dependencies are always resolved prior to "next step"). These guides don't support an infrastructure defined in one stack.
Any input or advice would be greatly appreciated.
Notes:
discussions/23447 has a similar issue with adding stages to a pipeline without passing the pipeline
Beta Was this translation helpful? Give feedback.
All reactions