aws-solutions / aws-control-tower-customizations

The Customizations for AWS Control Tower solution combines AWS Control Tower and other highly-available, trusted AWS services to help customers more quickly set up a secure, multi-account AWS environment using AWS best practices.
https://docs.aws.amazon.com/controltower/latest/userguide/cfct-overview.html
Apache License 2.0
360 stars 205 forks source link

Template file without parameters fails in v2 #51

Closed kkvinjam closed 3 years ago

kkvinjam commented 3 years ago

The resource.paramter_file is passing Null value when there is no parameter file for a given template. The manifest.yaml is inherited from version 1 repo.

This forces the template files to have a parameter.

2021-03-23T23:49:48.883-07:00   parameters = self._load_params_from_file(resource.parameter_file)
2021-03-23T23:49:48.883-07:00   File "/codebuild/output/src377331526/src/manifest/manifest_parser.py", line 373, in _load_params_from_file
2021-03-23T23:49:48.883-07:00   with open(parameter_file, 'r') as content_file:
2021-03-23T23:49:48.883-07:00   IsADirectoryError: [Errno 21] Is a directory: '/codebuild/output/src377331526/src/'
groverlalit commented 3 years ago

One of the properties _parameterfiles or parameters is required for the pipeline to generate an event with the parameters for the state machine. We can add this as a feature request to make these properties optional. I think this may add burden on the user to validate the template has default value for all the parameters in the template.

Please give a thumbs up this comment if this feature is applicable to you. Thanks.

trevorlatson commented 3 years ago

We should have the ability to deploy templates using only the default values contained within.

mcripps9 commented 3 years ago

Not only that, but we currently have a stack in our manifest that has no parameters, so we'll have to add one just to get it to deploy.

We just went through an exercise to leverage SSM for organization specific parameters so that we can deploy the same customizations package to multiple organizations, and since most of our parameters were organization related, we are increasingly using fewer parameters in the stacks.

cabjas01 commented 3 years ago

Updating the manifest version to 2021-03-15 seemed to solve this for us.

groverlalit commented 3 years ago

Thanks @cabjas01 for confirming. The new manifest version supports deploying StackSet without parameters or parameter_file property.