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

Metadata SSM fails for non-strings #213

Open
jarrod-lowe opened this issue Jul 25, 2022 · 1 comment
Open

Metadata SSM fails for non-strings #213

jarrod-lowe opened this issue Jul 25, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@jarrod-lowe
Copy link

AFT Version:
1.6.0

Bug Description
In the metadata SSM lambda, if the custom_fields is not strictly a map of strings, the SSM apply fails.

To Reproduce
Steps to reproduce the behavior:
In the terraform for the account request, set custom_fields to something with a non-string, i.e.:
custom_fields = {"foo": [1, 2]}
Create the account, or invoke the customisation. You'll get an error in aft-account-provisioning-framework-account-metadata-ssm

Expected behavior
No error

Related Logs
Invalid type for parameter Value, value: [1,2], type: <class 'list'>, valid types: <class 'str'>

Additional context
Workaround: Modify the lambda to add the line:
custom_fields = {key: str(value) for (key, value) in custom_fields.items()
Arguably, a better solution would be a string of JSON.

@jarrod-lowe jarrod-lowe added bug Something isn't working pending investigation Issue needs further investigation labels Jul 25, 2022
@snebhu3 snebhu3 added enhancement New feature or request and removed bug Something isn't working pending investigation Issue needs further investigation labels Aug 2, 2022
@snebhu3
Copy link

snebhu3 commented Aug 2, 2022

@jarrod-lowe thank you for reaching out.
Currently this behavior is as per design, however, we do have an existing backlog to support structured JSON as input to custom_fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants