See http://saml-doc.okta.com/SAML_Docs/How-to-Configure-SAML-2.0-for-Amazon-Web-Service#scenarioB for more information, documentation, etc.
- First, setup Okta application and download the metdatafile to ../saml-metadata.xml
- Setup in ~/.aws/credentials
[master_account]
aws_access_key_id = access_key_here
aws_secret_access_key = api_secret_key
- Then for each account you want Okta to allow access to... create a file (or add it to the master_user.tf file)
module "alpha_account" {
source = "modules/okta_access"
profile = "alpha_account"
}
and in credentials file
[alpha_account]
aws_access_key_id = alpha_account access key
aws_secret_access_key = alpha_account secret key
- Finally run
terraform plan -var master_account_profile=master_account -out terraform.out
terraform apply terraform.out