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
356 stars 205 forks source link

Print which SSM parameter was not found #68

Closed xmik closed 2 years ago

xmik commented 3 years ago

Without this PR

When we have the following resource in the manifest.yaml:

- name: SomeIAMRole
  resource_file: templates/some-iam-role.template
  parameters:
    - parameter_key: "param1"
      parameter_value: "$[alfred_ssm_/my/path/to/param1]"
    - parameter_key: "param2"
      parameter_value: "$[alfred_ssm_/my/path/to/param2]"

and a SSM parameter does not exist, we get the following error:

An error occurred (ParameterNotFound) when calling the GetParameter operation:

And in result, we don't know which SSM Parameter is not found.

With this PR

The error would be:

The following SSM Parameter was not found:  /my/path/to/param2
An error occurred (ParameterNotFound) when calling the GetParameter operation:

This will make troubleshooting easier.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

groverlalit commented 2 years ago

Thanks creating the pull request. We have added this to our backlog.

aijunpeng commented 2 years ago

This issued has been fixed.