Add veracode EU profiles to aws config with default names, but don't override US names where matching

This commit is contained in:
Arnie 2025-03-10 11:22:48 +01:00
parent 9ba138df96
commit 47a0914f75
No known key found for this signature in database
GPG Key ID: 4BDFA3BCF2999D11

View File

@ -255,26 +255,21 @@ in
sso_session = veracode-us
region = us-east-1
output = json
[profile id-${id}]
sso_account_id = ${id}
sso_role_name = ${account.role}
sso_session = veracode-us
region = us-east-1
output = json
'') accounts.us
)}
${builtins.concatStringsSep "\n" (
lib.mapAttrsToList (id: account: ''
[profile eu-${account.name}]
${if lib.any (usAccount: usAccount.name == account.name) (lib.attrValues accounts.us) then "" else ''
[profile ${account.name}]
sso_account_id = ${id}
sso_role_name = ${account.role}
sso_session = veracode-eu
region = eu-central-1
output = json
''}
[profile id-${id}]
[profile eu-${account.name}]
sso_account_id = ${id}
sso_role_name = ${account.role}
sso_session = veracode-eu