aws-control-tower-customizations icon indicating copy to clipboard operation
aws-control-tower-customizations copied to clipboard

Incorrect parsing parameter_value when value is set to Yes

Open lapkritinis opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug When deploying CFT if parameter is specified like this:

      - parameter_key: AssumeRoleRequired
        parameter_value: Yes 

Parameter value gets modified to 'true'

and stack fails to launch due allowed values constraint

To Reproduce Try launch template with such block:

Parameters:
  AssumeRoleRequired:
    Type: String
    AllowedValues:
      - 'No'
      - 'Yes'

Expected behavior It should pick specified value

Please complete the following information about the solution:

  • [ ] Version: 2.5.1

lapkritinis avatar Oct 25 '22 20:10 lapkritinis

Hey @lapkritinis, I'm not actually able to reproduce this bug. Could you reach out to AWS Premium Support to help you with this issue?

balltrev avatar Nov 01 '22 17:11 balltrev

Additional details from: https://github.com/aws-solutions/aws-control-tower-customizations/issues/140

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

stumins avatar Jan 05 '23 19:01 stumins