Cloudformation Git sync with change sets?

0

All examples of Cloudformation Git sync show how stack update would be triggered from git commits. Instead of updating the stack, would it be possible to create a change set to be approved and executed later?

EDIT: Git sync being this feature https://aws.amazon.com/about-aws/whats-new/2023/11/aws-cloudformation-git-management-stacks/

profile picture
전문가
Kallu
질문됨 4달 전261회 조회
3개 답변
2
수락된 답변

We have a fun feature in the works where we’ll comment on your pull request with the contents of the changeset. That way you can review it and when you merge the PR, know what’ll happen!!

❤️ with love from the CloudFormation team ❤️

David
답변함 3달 전
profile picture
전문가
검토됨 14일 전
profile picture
전문가
검토됨 2달 전
  • What could be better than changeset? Changeset in PR :-)

0

Yes, it is possible to create a change set from a Git commit instead of directly updating the stack. When a commit is made to the Git repo, a change set can be created to preview the proposed changes before executing them.

Configure the CodePipeline to trigger on Git commits and pass the source code to CodeBuild. In CodeBuild, run a script that syncs the source code and generates a CloudFormation template.

Use the aws cloudformation create-change-set command to create a change set based on the updated template without applying the changes.

View and approve the change set in the console.

Once approved, the change set can be executed using aws cloudformation execute-change-set to update the stack.

This allows reviewing the proposed infrastructure changes before executing them, reducing the risk of unintended updates to production resources from Git commits. The change set acts as a checkpoint between code changes and stack updates.

profile picture
전문가
답변함 4달 전
0

Hi,

Why don't you just use CLI command aws cloudformation create-change-set in the workflow described in the blog hyperlinked from the announcement that you point ? See documentation https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/create-change-set.html

You can save the id of this change set and apply it as such at your convenience.

Best,

Didier

profile pictureAWS
전문가
답변함 4달 전
  • But that git workflow is to run locally on developer laptop. The beef of git sync is (IMHO) you don't need to manage own runners, configure custom CodeBuilds or provide direct access to AWS for devs. Which is nice, it just would have been even better with an option to create a change-set as part of the process.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠