Let’s say I have some credentials profile “foo” set up in my ~/.aws/credentials. That account can assume role “arn::bar”. In turn, when you assume role “arn::bar”, you can then assume role “arn::baz”. However, account “foo” cannot directly assume role “arn::baz”. How can I configure Terraform aws provider to assume role “arn::baz”? If I do
provider "aws" {
alias = "baz"
profile = "foo"
assume_role {
role_arn = "arn::baz"
}
it will try to assume role “arn::baz” straight using credentials from profile foo, without assuming role “arn::bar” first, and so it will fail.