Skip to content

Commit bb94063

Browse files
author
John Preston
committed
Working templates for blog v1.
1 parent 7dc8512 commit bb94063

1 file changed

Lines changed: 47 additions & 1 deletion

File tree

cicd-pipeline-ecs-composex/cfn-templates/cd_pipeline.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,20 @@ Resources:
191191
- kms:Decrypt
192192
Resource:
193193
- !Ref KmsKeyArn
194+
- PolicyName: SNSPublish
195+
PolicyDocument:
196+
Version: 2012-10-17
197+
Statement:
198+
- Effect: Allow
199+
Action:
200+
- sns:Publish
201+
Resource:
202+
- !Ref ApprovalTopic
203+
204+
ApprovalTopic:
205+
Type: AWS::SNS::Topic
206+
Properties:
207+
DisplayName: !Sub '${AWS::StackName}Approval'
194208

195209
EcsComposeXGenerate:
196210
Type: AWS::CodeBuild::Project
@@ -263,7 +277,7 @@ Resources:
263277
ActionMode: CREATE_UPDATE
264278
RoleArn: !Ref DevAccountCfnRoleArn
265279
StackName: !Sub 'dev'
266-
TemplatePath: !Sub 'ComposeXOutput::composex_root.yml'
280+
TemplatePath: !Sub 'ComposeXOutput::composex_dev.yml'
267281
# TemplateConfiguration: !Sub 'ComposeXOutput::composex_root.params.json'
268282
Capabilities: 'CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM'
269283
InputArtifacts:
@@ -286,3 +300,35 @@ Resources:
286300
Name: DeployToDev
287301
RunOrder: '1'
288302
RoleArn: !Ref DevAccountPipelineRoleArn
303+
- Name: !Sub 'ApproveToProd'
304+
Actions:
305+
- ActionTypeId:
306+
Category: Approval
307+
Owner: AWS
308+
Provider: Manual
309+
Version: '1'
310+
Configuration:
311+
NotificationArn: !Ref 'ApprovalTopic'
312+
Name: RequestApproval
313+
- Name: !Sub 'DeployToProd'
314+
Actions:
315+
- Name: DeployToProd
316+
ActionTypeId:
317+
Category: Deploy
318+
Owner: AWS
319+
Provider: CloudFormation
320+
Version: '1'
321+
Configuration:
322+
ActionMode: CREATE_UPDATE
323+
RoleArn: !Ref ProdAccountCfnRoleArn
324+
StackName: !Sub 'production'
325+
TemplatePath: !Sub 'ComposeXOutput::composex_prod.yml'
326+
TemplateConfiguration: !Sub 'DockerComposeSource::prod-configuration.json'
327+
Capabilities: 'CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM'
328+
InputArtifacts:
329+
- Name: ComposeXOutput
330+
- Name: DockerComposeSource
331+
OutputArtifacts:
332+
- Name: ProdStackOutput
333+
RunOrder: '1'
334+
RoleArn: !Ref ProdAccountPipelineRoleArn

0 commit comments

Comments
 (0)