in infra/src/app_config_parser.py [0:0]
def parse_deploy_params(self, json_file):
"""
Constructs the CDK parameters which is equal to CFN parameters
:param json_file:
:return:
"""
with open(json_file, encoding="utf-8") as f:
json_dict = json.load(f)
stack_prefix = json_dict["Name"]
stack_variables = self._get_variables(json_dict)
stack_deploy_dict = {}
for stack_type, stack_params in json_dict["Stacks"].items():
deploy_params = stack_params.get("CDKDeploy", {})
params = []
for k, v in deploy_params.items():
if k == "EnvironmentParams":
params.extend(self._get_env_parameters(stack_variables, v))
else:
v = self._variable_substitute(stack_variables, v)
params.extend(["--parameters", '{}={}'.format(k, v)])
stack_deploy_dict[stack_type] = params
return stack_prefix, stack_deploy_dict