Skip to content

Commit

Permalink
remove debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj committed Sep 7, 2023
1 parent da9f95b commit 31feaa6
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions plugins/common/aws/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package aws

import (
"context"
"fmt"
"os"
"runtime"

awsV2 "github.com/aws/aws-sdk-go-v2/aws"
configV2 "github.com/aws/aws-sdk-go-v2/config"
Expand All @@ -28,16 +25,9 @@ type CredentialConfig struct {
}

func (c *CredentialConfig) Credentials() (awsV2.Config, error) {
fmt.Println(runtime.GOOS)
fmt.Println(runtime.GOARCH)
fmt.Printf("env AWS_REGION is %q\n", os.Getenv("AWS_REGION"))
fmt.Printf("setting region to: %s\n", c.Region)
if c.RoleARN != "" {
fmt.Println("loading with assume credentials")
fmt.Printf("role arn: %s\n", c.RoleARN)
return c.configWithAssumeCredentials()
}
fmt.Println("loading with root credentials")
return c.configWithRootCredentials()
}

Expand All @@ -60,7 +50,6 @@ func (c *CredentialConfig) configWithRootCredentials() (awsV2.Config, error) {

config, err := configV2.LoadDefaultConfig(context.Background(), options...)

fmt.Printf("loaded config is using region: %s\n", config.Region)
return config, err
}

Expand Down Expand Up @@ -93,7 +82,5 @@ func (c *CredentialConfig) configWithAssumeCredentials() (awsV2.Config, error) {
}

defaultConfig.Credentials = awsV2.NewCredentialsCache(provider)
fmt.Printf("loaded config is using region: %s\n", defaultConfig.Region)

return defaultConfig, nil
}

0 comments on commit 31feaa6

Please sign in to comment.