-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure unique resources ID are created #118
base: master
Are you sure you want to change the base?
Ensure unique resources ID are created #118
Conversation
While deploying a multi pipeline that will independently deploy FE and BE ECS services under the same ALB
This reverts commit cac1627.
@hupe1980 any chances for this to be reviewed? Thanks |
@hupe1980 any change for this to be looked at? It should be quick as doesn't change anything major. Thanks |
@hupe1980 Hi, I also come across this issue if I try to deploy multiple services in one stack, is there any change for you to look at this PR |
Actually, the cdk framework already attaches an id to the logical name. Even the stdlib does not take any further steps. How is your stack structured exactly? |
Of course it does , but if in the same stack you call that CDK construct twice (e.g. you deploy two services at once, for instance fe and be), CDK will complain as that resource exists a ready. We have a stack like this
The construct then will loop through the above array of pipelines and creates independent codePipleine/CodeDeploy |
@hupe1980 as said in my PR we have already forked this and made the changes ourselves as per this PR and it works, problem is we don't w3ant to maintain the fork each time you change this project hence why we are requiring the change to be approved. I can walk you through our use case (which I believe it is quite unique) if you can let me know abut your availability in NZT (we can zeoom call) |
Do you set always new IDs during the loop?
|
HI @hupe1980 we definitely do when we create our own resources however as you can see from the above error stack the problem is with a resource we have no control of Look at the following example from my PR, if I try to create those resources as part of the same stack twice (two different pipelines) AWS will complain as I have already one resource with that Name. You can use I am still keen to show while it is happening if you indicate a time suitable to attend a zoom? |
Ah okay. I understand it : The problem is the singleton 'getOrCreate': cdk-constructs/packages/cdk-blue-green-container-deployment/src/ecs-deployment-group.ts Line 108 in 0ff07cb
We have to replace the singleton with a normal construct |
Nice thx |
Context:
While deploying a multi pipeline with a single stack that will independently deploy FE and BE ECS services (under the same ALB) we noted the following issue.Issues:
Resources IDs aren't unique while being created as part of a single CDK stack.Architectural Diagram of the target state