By using AWS re:Post, you agree to the Terms of Use

Using Terraform with AWS SSO accounts


Hi, I'm using ControlTower to deploy my infrastructure with multiple accounts. Now I want to use terraform but authentication is currently done via SSO and I have noticed that terraform isn't able to handle these kind of credentials. Which is the best way to use terraform with SSO ? I think the only way at the moment is to use a dedicated user in a separated account.

thank you guys, Ax.

1 Answers

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] [2]

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions