May I ask for advice on exporting a dict in Python?
Copy code
iac_admin_role_arns = {}
for account in ACCOUNTS:
iac_admin_role_arns[str(account)] = <role arn Output>
pulumi.export("iac-admin-role-arns", iac_admin_role_arns)
This throws:
Copy code
k: await serialize_property(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dennispan/code/iac/iam/venv/lib/python3.11/site-packages/pulumi/runtime/rpc.py", line 562, in serialize_property
raise ValueError(f"unexpected input of type {type(value).__name__}")
ValueError: unexpected input of type dict_values
b
billowy-army-68599
09/06/2023, 9:12 PM
this looks like you’re trying to add an output to a dict of string, rather than an export problem
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.