This is a sample repo to demonstrate TF's interaction with an AWS SSO profile.
Steps (default profile):
- Clone repo and run
terraform init - Run
aws configure ssoand when prompted forCLI profile nameenterdefault(thus making this configuration the default profile for AWS SSO in the CLI also) - Run
aws sso login(without specifying--profile xxxx) - Run
terraform plan - Output should be visible, without TF errors for credentials etc.
For a named profile (i.e. aws sso login --profile foobar):
- Replace
profileinside the AWS provider (main.tf) from"default"to"foobar" - Run
aws configure ssoand setCLI profile nametofoobarwhen prompted - Run
aws sso login --profile foobar - Run
terraform plan - Output should be visible, without TF errors for credentials etc.