CloudPormeline CodePipeline Template Configuration

I am trying to use the CloudFormation template configuration field in CodePipeline. If you are editing CloudFormation in CodePipeline, it looks like this:

enter image description here

If my InputArtifactName is MyAppBuild and I have the CloudFormation configuration file in cfg-prd.json , I hope I could enter MyAppBuild::cfg-prd.json and pick it up.

I get an error when the template file is invalid, although it works manually as:

 --parameters cfg-prd.json 
+5
source share
2 answers

Note that the template configuration file has a different JSON structure than the format accepted by the --parameters option on aws cloudformation create-stack :

 { "Parameters" : { "NameOfTemplateParameter" : "ValueOfParameter", ... }, "StackPolicy" : { "Statement" : [ StackPolicyStatement ] } } 
+6
source

A good trick to see what the Cloudformation layout should be like is to create a pipeline that you know will work. Then use the CLI to retrieve the cloud information template.

 aws codepipline get-pipeline --name <pipelinename> 

You will receive the JSON of the Codepipeline resource. Several changes will be made, but from this you can see exactly what the syntax should be, and from there your template will be parameterized with the Codepipelines software.

+1
source

Source: https://habr.com/ru/post/1263065/


All Articles