Is anyone using AWS `assumeRole` from Inline progr...
# dotnet
h
Is anyone using AWS
assumeRole
from Inline program? Appreciate an example if someone has one. It’s pretty straight-forward to set AWS region
await stack.SetConfigAsync("aws:region", new ConfigValue("us-east-1"));
I’m trying to figure out how to pass in the assumeRole settings using the same approach as the region.
tried this
await stack.SetConfigAsync("aws:assumeRole.roleArn", new ConfigValue("arn:aws:iam::xxxxxx:role/mcrTestPulumi"));
also tried passing in assumeRole setting
var assumeRoleSettings = JsonSerializer.Serialize(new Dictionary<string, object>
{
{
"assumeRole",
new[]
{
new Dictionary<string, object?>
{
{ "roleArn", "arn:aws:iam::xxxx:role/mcrTestPulumi" }
},
}
},
Copy code
});
got this to work
var assumeRoleSettings2 = JsonSerializer.Serialize(new Dictionary<string, string>
{
{ "roleArn", "arn:aws:iam::504653139595:role/mcrTestPulumi" }
});
await stack.SetConfigAsync("aws:assumeRole", new ConfigValue(assumeRoleSettings2));
I had some odd error messages regarding my config, that I wasn’t able to troubleshoot. I had to delete my stack and then got things going with the above command.
w
h
Can you use the AWS provider with Inline program?
c
piggybacking on what michael is doing, it seems when using an s3 backend, it doesn’t assume-role when accessing s3. is there a way to configure assume-role for the s3 backend?
w
Can you use the AWS provider with Inline program?
I would expect so as that's just another way to wire up the program body