Hello, I'm trying to use the aws-native provider t...
# aws
d
Hello, I'm trying to use the aws-native provider to create an AWS role with an in-line policy and am running into an error that looks like the following:
Copy code
AssertionError: Unexpected type; expected a value of type `<class 'str'>` but got a value of type `<class 'dict'>` at resource `iam-role-example`, property `policies.0.policyDocument`: {'version': '2012-10-17', 'statement': [{'resource': '*', 'effect': 'Allow', 'action': ['example:Permission']}]}
The code is based directly off examples from: https://www.pulumi.com/registry/packages/aws-native/api-docs/iam/role/ and I've tried it with and without
json.dumps
on the policy_document. Currently I am in a broken state where I have to delete the Pulumi state to get the
pulumi up
command to no longer crash. Is there a better reference for how to define a role with a policy, or should I just switch to the "AWS Classic" provider?