How to use CloudFormation CLI to create a stack with CloudFormation Git sync?

1

With the new AWS CloudFormation Git sync feature, I am trying to setup the GitOps flow for my AWS CDK projects on Gitlab.

In all demos I can find, the initial CloudFormation stack with sync settings was created manually from the AWS console, but I am trying to integrate it into Gitlab pipeline, so I want to create the stack via CloudFormation or CDK CLI.

It seems I have to use CodeStar CLI: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codestar-connections/create-connection.html https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codestar-connections/create-sync-configuration.html

But I noticed this notification: "On July 31, 2024, AWS will discontinue support for AWS CodeStar projects, including creating and viewing projects." So, we cannot use CodeStar after 5 months, which is not too long.

May I know the best way to create the initial CloudFormation stack via code/CLI?

Thanks Feng

3개 답변
2
수락된 답변

Hiya friend!

Yea, so to answer your questions you can use CSC to create your sync configuration - of course, you can provision that configuration in CloudFormation as well :D

CodeStarConnections is v different from CodeStar - and we're in the process of making that clearer with API namespaces that better fit :)

Anyway, hope you enjoy git sync!!!

답변함 2달 전
profile picture
전문가
검토됨 2달 전
1

Important piece is you can continue using codestar connections to sync with github etc.

AWS CodeStar Connections will not be impacted by this discontinuation.

profile picture
전문가
Kallu
답변함 2달 전
  • Thanks. Didn't notice this.

0

This can help you auth.

After that Synth and deploy.


aws cloudformation create-stack --stack-name YourStackName --template-body file://your-template.yaml --parameters ParameterKey=Key,ParameterValue=Value --capabilities CAPABILITY_IAM
profile picture
전문가
답변함 2달 전
  • Git sync configuration items are not CloudFormation parameters, so this won't work

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

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

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

관련 콘텐츠