Custom rule loop through resource type #2981
Unanswered
liyaqatali
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Resources:
CodePipelineDev:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://cf-templates.s3.us-west-1.amazonaws.com/CF-CodePipeline-Apps-V3.yml
Parameters:
Repository: !Ref Repository
Branch: master
Env: 'dev'
DeploymentGroup: 'Development'
TargetServerBlue: !Ref AppServerDevBlue
TargetServerGreen: !Ref AppServerDevGreen
DockerImage: !Ref DockerImage
CodePipelineStg:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://cf-templates.s3.us-west-1.amazonaws.com/CF-CodePipeline-Apps-V3.yml
Parameters:
Repository: !Ref Repository
Branch: master
Env: 'stg'
DeploymentGroup: 'Staging'
TargetServerBlue: !Ref AppServerStgBlue
TargetServerGreen: !Ref AppServerStgGreen
DockerImage: !Ref DockerImage
I have a Cloudformation template as above, how to validate TargetServerBlue and TargetServerGreen properties and their values based on environment using custom rules?
Is there any way to validate Parameters values?:
AWSTemplateFormatVersion: 2010-09-09
Parameters:
Repository:
Type: "String"
Default: Admin
AppServerDevBlue:
Description: Target app server. Make sure the value is in uppercase
Type: "String"
Default: AWS001
AppServerDevGreen:
Description: Target app server. Make sure the value is in uppercase
Type: "String"
Default: AWS002
AppServerStgBlue:
Description: Target app server. Make sure the value is in uppercase
Type: "String"
Default: AWS003
AppServerStgGreen:
Description: Target app server. Make sure the value is in uppercase
Type: "String"
Default: AWS004
Thanks
Beta Was this translation helpful? Give feedback.
All reactions