You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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
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.
The text was updated successfully, but these errors were encountered: