GoogleCloudPlatform / terraformer

CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Apache License 2.0
12.67k stars 1.65k forks source link

Compatibility issue with aws config `sso_profile` #1948

Open Shion1305 opened 2 weeks ago

Shion1305 commented 2 weeks ago

aws configure sso generates .aws/config as following, but terraformer is not compatible with this format.

[profile prd]
sso_session = prd
sso_account_id = xxxxxxxxx
sso_role_name = xxxxxxxxx
region = ap-northeast-1
output = json
[sso-session prd]
sso_start_url = https://d-xxxxxxxxx.awsapps.com/start/#
sso_region = us-east-1
sso_registration_scopes = sso:account:access

If you rewrite this config file like following, it does work.

[profile prd]
sso_account_id = xxxxxxxxxx
sso_role_name = xxxxxxxxxxx
region = ap-northeast-1
output = json
sso_start_url = https://d-xxxxxxxxxx.awsapps.com/start/#
sso_region = us-east-1