thankful-stone-34269
11/10/2022, 12:11 AMmachine_role = aws.iam.Role("dockerbuilder-role", ...)
and then I try to create an EC2 instance that uses this role:
server = aws.ec2.Instance('dockerbuilder-pulumi',
iam_instance_profile=machine_role,
...)
The error message (which annoyingly takes 2 minutes to resolve annoyingly) is InvalidParameterValue: Value (dockerbuilder-role-908245c) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name
.
Now if I instantiate the Instance with `
iam_instance_profile="dockerbuilder-role-908245c",
it works. How do I get the name out of the role object to pass into the instance?iam_instance_profile=machine_role.name,
machine_profile = aws.iam.InstanceProfile("dockerbuilder-profile", role=machine_role.name)
...
iam_instance_profile=machine_profile,