Skip to content

Commit cfc52b6

Browse files
committed
Added cfn support for planned only, unplanned only or all support
1 parent bc447dc commit cfc52b6

File tree

2 files changed

+312
-13
lines changed

2 files changed

+312
-13
lines changed

buildstack.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ def buildstack(region):
1919
create_stack_response = client.create_stack(
2020
StackName=stackname,
2121
TemplateBody=templateBody,
22+
Parameters=[
23+
{
24+
'ParameterKey': 'featuresupport',
25+
'ParameterValue': paramfeature
26+
}
27+
],
2228
NotificationARNs=[],
2329
Capabilities=[
2430
'CAPABILITY_NAMED_IAM',
@@ -112,6 +118,7 @@ def main():
112118
parser.add_argument("-t","--template-body", default='managed-gdb-cft.yml', type=str, help="CloudFormation template file")
113119
parser.add_argument("-r","--region-list", type=str,help="List of regions separated by commas, where the stack will be deployed")
114120
parser.add_argument("-s","--stack-name", type=str, help="CloudFormation Stack Name")
121+
parser.add_argument("-f","--features", default ='all', type=str, help="Choose Feature support (options: planned,unplanned,all(default)")
115122
parser.add_argument("-a","--consent-anonymous-data-collect", type=str, default='yes',help="Opt-in or out of anonymous one time data collection.(yes/no). Only collects region name, creation time, stack name and uuid portion of the stack id (for uniqueness).")
116123

117124
# process arguments
@@ -120,9 +127,14 @@ def main():
120127
# dictionary for region and stack ids
121128
stack_regions = {}
122129

130+
# get the passed stack name
123131
global stackname
124132
stackname = args.stack_name
125133

134+
# get the feature parameter
135+
global paramfeature
136+
paramfeature = args.features
137+
126138
http = urllib3.PoolManager()
127139

128140
tepmlatefname = args.template_body

0 commit comments

Comments
 (0)