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

Incorrect parsing parameter_value when value is set to Yes part 2 #140

Closed lapkritinis closed 1 year ago

lapkritinis commented 1 year ago

Describe the bug I am setting up test case for issue #136 @balltrev

To Reproduce CFT. It works just fine if using AWS Console

AWSTemplateFormatVersion: "2010-09-09"
Description: Demo the issue with "Yes" with CCT

Parameters:
  Selection:
    Type: String
    AllowedValues:
      - 'No'
      - 'Yes'
    Default: 'No'

Conditions:
  SelectedYes: !Equals [ !Ref Selection, 'Yes' ]

Resources:
  S3Bucket:
    Condition: SelectedYes
    Type: AWS::S3::Bucket

Manifest part:

  - name: DemoIssue
    resource_file: templates/Test.yaml
    parameters:
      - parameter_key: Selection
        parameter_value: Yes
    deploy_method: stack_set
    deployment_targets:
      accounts:
        - security

Expected behavior S3 bucket should be created

Instead I get error:

Parameter 'Selection' must be one of AllowedValues

Please complete the following information about the solution: Version: [e.g. v1.5.1]

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0089) - customizations-for-aws-control-tower Solution. Version: v1.0.0". You can also find the version from releases

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

stumins commented 1 year ago

Hi @lapkritinis,

Thanks for providing these additional details. I've reopened #136 for further review and copied this test case over - I'm going to close this issue to reduce duplication - please track the bug under #136.