mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-22 00:30:40 +00:00
returning true only when all credentials are set
This commit is contained in:
parent
8d8f5c4d78
commit
5876dd5a26
@ -172,11 +172,11 @@ func CopyTfEnv() {
|
||||
func credsSet() bool {
|
||||
awsTokens := []string{"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"}
|
||||
for _, token := range awsTokens {
|
||||
if os.Getenv(token) != "" {
|
||||
return true
|
||||
if os.Getenv(token) == "" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
func assumeRole(roleArn string) {
|
||||
|
Loading…
Reference in New Issue
Block a user