简体   繁体   English

cloudFormation部署后执行堆栈

[英]Execute stack after cloudFormation Deploy

I have a ApiGateway made with Serverless-model-application that I made a integration with GitHub via CodePipeline , everything is running fine, the pipeline reads the webhook, builds the buildpsec.yml and deploys the CloudFormation file, creating the updating the stack. 我有一个无服务器模型的应用做出了ApiGateway,我通过CodePipeline用做一个GitHub的整合,一切都很好运行,管道读取网络挂接,构建buildpsec.yml并部署CloudFormation文件,创建更新堆栈。

The thing is after the stack is updated it still needs a approval on the console, how can I make the execute on the stack update be auto-run? 问题是更新堆栈后,它仍需要控制台批准,如何使堆栈更新的执行自动运行?

It sounds like your pipeline is doing one of two things, unless I'm misunderstanding you: 听起来您的pipeline正在执行以下两项操作之一,除非我误解了您:

  1. Making a change set but not executing it in the cloudformation console. 进行更改集,但不能在cloudformation控制台中执行它。
  2. Proceeding to a manual approval step in the pipeline and awaiting your confirmation. 继续进行管道中的手动批准步骤,并等待您的确认。

Since #2 is simply solved by removing that step, let's talk about #1. 由于只需删除该步骤即可解决#2,因此我们来谈谈#1。

Assuming you are successfully creating a change set called ChangeSetName , you need a step in your pipeline with the following (cfn JSON template syntax): 假设您成功创建了一个名为ChangeSetName的变更集,则需要在管道中执行以下步骤(cfn JSON模板语法):

"Name": "StepName",
"ActionTypeId": {"Category": "Deploy",
                 "Owner": "AWS",
                 "Provider": "CloudFormation",
                 "Version": "1"
                                },
                 "Configuration": {
                 "ActionMode": "CHANGE_SET_EXECUTE",
                 "ChangeSetName": {
                 "Ref": "ChangeSetName"
                                    },
                 ...

Keep the other parameters (eg RoleArn) consistent per usual. 保持其他参数(例如RoleArn)一致。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 参考现有资源部署 cloudformation 堆栈 - Deploy cloudformation stack referencing existing resource AWS CloudFormation创建堆栈与部署 - AWS CloudFormation create-stack vs deploy 如何在cloudformation中使用一个模板部署多个堆栈 - How to deploy multiple stack with one template in cloudformation 在 CloudFormation 堆栈删除上执行 Lambda Function - Execute Lambda Function on CloudFormation Stack delete 超时后自动删除CloudFormation堆栈 - Automatically delete CloudFormation Stack after a timeout cloudformation 堆栈部署完成后返回 FilesystemID - Return FilesystemID after cloudformation stack deployment complete CDK/Cloudformation - 由于手动删除了 Lambda 版本,无法部署堆栈 - CDK/Cloudformation - Unable to deploy stack because of Lambda Version deleted manually Jenkins构建CloudFormation Stack,然后通过CodeDeploy插件部署代码 - Jenkins to build CloudFormation Stack then deploy code via CodeDeploy plugin AWS Cloudformation - 嵌套堆栈 - 堆栈部署失败但未给出原因 - AWS Cloudformation - nested stacks - stack keeps failing deploy but not reason is given 是否可以在创建 CloudFormation 堆栈后将标签添加到它? - Is it possible to just add tags to CloudFormation stack after it is created?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM