Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Using StringList replacement doesn't properly work/validate #607

Open
5 of 6 tasks
mbevc1 opened this issue Oct 17, 2024 · 2 comments
Open
5 of 6 tasks

bug: Using StringList replacement doesn't properly work/validate #607

mbevc1 opened this issue Oct 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mbevc1
Copy link

mbevc1 commented Oct 17, 2024

Describe the bug
When using a StringList from replacements in Array field in other configs validation succeeds, but Prepare fails in the pipeline with:

* /reports/budgets/0/notifications/0/recipients/0 => must be string
* /reports/budgets/0/notifications/1/recipients/0 => must be string
* /reports/budgets/0/notifications/2/recipients/0 => must be string
* /reports/budgets/0/notifications/3/recipients/0 => must be string

To Reproduce
Create a variable in replacements-config.yaml:

- key: BudgetEmails
    type: StringList
    value: [ [email protected], [email protected] ]

then use it in global-config.yaml:

reports:
  budgets:
    - deploymentTargets:
        accounts:
          - Management
      name: accel-budget
      timeUnit: MONTHLY
      type: COST
      amount: 100
      includeUpfront: true
      includeTax: true
      includeSupport: true
      includeSubscription: true
      includeRecurring: true
      includeOtherSubscription: true
      includeDiscount: true
      includeCredit: false
      includeRefund: false
      useBlended: false
      useAmortized: false
      unit: USD
      notifications:
        - type: FORECASTED
          thresholdType: PERCENTAGE
          threshold: 100
          comparisonOperator: GREATER_THAN
          subscriptionType: EMAIL
          recipients: [ {{ BudgetEmails }} ]

Expected behavior
Validation succeeds and so should the pipeline.

Please complete the following information about the solution:

  • Version: [v1.9.2]

To get the version of the solution, you can look at the description of the created AWS CloudFormation stack used to install the LZA (AWSAccelerator-InstallerStack). For example, "(SO0199) Landing Zone Accelerator on AWS. Version 1.5.1.". If the description does not contain the version information, you can look at the Parameters of the stack for the RepositoryBranchName as that should contain the version number.

  • Region: [e.g. eu-west-1]
  • Was the solution modified from the version published on this repository? No
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for the services this solution uses?
  • Were there any errors in the CloudWatch Logs? No

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.

@mbevc1 mbevc1 added the bug Something isn't working label Oct 17, 2024
@richardkeit
Copy link
Contributor

Hi @mbevc1 ,

What happens if you remove the square brace in your config?

Given your replacement is already a list, there may be an off chance it works

@mbevc1
Copy link
Author

mbevc1 commented Oct 17, 2024

Yeah, that was my first attempt, but in that case validator fails saying it's not an Array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants