average-france-9957
06/23/2022, 2:48 PM['us-east-1', 'us-east-2', 'ap-northeast-1', ...etc...]
and the end goal would be something like this in my config yaml
aws:regions:
- "ap-northeast-2"
- "ap-northeast-3"
- ...etc...
My python snippet is
stack.set_config(f"aws:regions", auto.ConfigValue(value=regions))
but that throws TypeError: expected str, bytes or os.PathLike object, not list
What is the best/correct way to set yaml arrays with the python automation API? Thanks you!config:
aws:regions: '["us-east-1", "eu-central-1", "ap-southeast-2", "ap-northeast-1"]'
automation.py
stack.set_config(f"{project}:regions", auto.ConfigValue(value=json.dumps(regions)))
pulumi.py
regions = json.loads(config.require("regions"))