org-formation / org-formation-cli

Better than landingzones!
MIT License
1.4k stars 129 forks source link

A way to update pipeline #552

Open m-radzikowski opened 5 months ago

m-radzikowski commented 5 months ago

Subject of the issue

I had orgformation pipeline created >2 years ago. I wanted to update it because I got some errors in CI. However, I did not find any way to do it automatically.

Running org-formation init-pipeline updated the CloudFormation stack, but did not commit changes to the CodeCommit repository (since it already existed).

I ended up creating a new, separate orgformation pipeline and copying generated resources from it.

Is this an expected way of solving it or am I blind and don't see something?

For me, the best solution would be a CLI command that would update existing ./000-organization-build files locally that I could review and commit to be applied by existing CI.

yannickvr commented 5 months ago

This is not a native feature, but you can consider adding a task before OrganizationBuildPipeline that downloads the latest template ( https://github.com/org-formation/org-formation-cli/blob/master/resources/orgformation-codepipeline.yml ) and then update the TemplatePath to the new location. For the new task, you can use the !Cmd function to get the template with the upload-to-s3 task and push it to a new bucket. You can use the S3 bucket key for the TemplatePath