- Newest
- Most votes
- Most comments
If you create a profile through SSO using the AWS CLI with aws configure sso
[1], you should be able to then use this profile name within Terraform, either by setting it within the Terraform provider [2], or by setting the AWS_PROFILE
environment variable in the shell before you run terraform apply
.
[1] https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html#sso-configure-profile-auto [2] https://registry.terraform.io/providers/hashicorp/aws/latest/docs#shared-configuration-and-credentials-files
If you use ControlTower you need to deploy a custom role, moreover the use of AWS_PROFILE in team is a mess because you must have the same profile name set on each local machine that run that code. Also in a pipeline could be a problem.
Relevant content
- asked 8 months ago
- AWS OFFICIALUpdated 2 years ago