diff --git a/awsutil/generate_credentials.go b/awsutil/generate_credentials.go index b7a4cbb..b25901b 100644 --- a/awsutil/generate_credentials.go +++ b/awsutil/generate_credentials.go @@ -5,6 +5,7 @@ package awsutil import ( "context" + "errors" "fmt" "net/http" "os" @@ -20,7 +21,17 @@ import ( "github.com/hashicorp/go-hclog" ) -const iamServerIdHeader = "X-Vault-AWS-IAM-Server-ID" +const ( + iamServerIdHeader = "X-Vault-AWS-IAM-Server-ID" + defaultStr = "default" + envAwsProfile = "AWS_PROFILE" +) + +var ( + ErrReadOptsCredChain = errors.New("error reading options in GenerateCredentialChain") + ErrBadStaticCreds = errors.New("static AWS client credentials haven't been properly configured (the access key or secret key were provided but not both)") + ErrLoadConfigWithCredsFailed = errors.New("failed to load SDK's default configurations with given credential options") +) type CredentialsConfig struct { // The access key if static credentials are being used @@ -164,7 +175,7 @@ func (c *CredentialsConfig) log(level hclog.Level, msg string, args ...interface } } -func (c *CredentialsConfig) generateAwsConfigOptions(opts options) []func(*config.LoadOptions) error { +func (c *CredentialsConfig) generateAwsConfigOptions(ctx context.Context, opts options) []func(*config.LoadOptions) error { var cfgOpts []func(*config.LoadOptions) error if c.Region != "" { @@ -181,16 +192,28 @@ func (c *CredentialsConfig) generateAwsConfigOptions(opts options) []func(*confi // Add the shared credentials if opts.withSharedCredentials { - profile := os.Getenv("AWS_PROFILE") + profile := os.Getenv(envAwsProfile) if profile != "" { c.Profile = profile } // The AWS SDK will check for the 'default' shared profile and include it if it exists. If // WithSharedConfigProfile is set to 'default' here, and it does not exist the SDK will return an error. So - // only set the config profile if the caller or env has explicitly set one. + // if profile is not set, check for a default profile and add it only if it exists. if c.Profile != "" { cfgOpts = append(cfgOpts, config.WithSharedConfigProfile(c.Profile)) + } else { + c.Profile = defaultStr + opts := []func(*config.LoadOptions) error{config.WithSharedConfigProfile(defaultStr)} + if c.Filename != "" { + opts = append(opts, config.WithSharedCredentialsFiles([]string{c.Filename})) + } + _, err := config.LoadDefaultConfig(ctx, opts...) + // aws-sdk's special errors don't work with go's errors.Is + _, ok := err.(config.SharedConfigProfileNotExistError) + if !ok { + cfgOpts = append(cfgOpts, config.WithSharedConfigProfile(defaultStr)) + } } cfgOpts = append(cfgOpts, config.WithSharedCredentialsFiles([]string{c.Filename})) @@ -257,17 +280,17 @@ func (c *CredentialsConfig) generateAwsConfigOptions(opts options) []func(*confi func (c *CredentialsConfig) GenerateCredentialChain(ctx context.Context, opt ...Option) (*aws.Config, error) { opts, err := getOpts(opt...) if err != nil { - return nil, fmt.Errorf("error reading options in GenerateCredentialChain: %w", err) + return nil, fmt.Errorf("%w: %w", ErrReadOptsCredChain, err) } // Have one or the other but not both and not neither if (c.AccessKey != "" && c.SecretKey == "") || (c.AccessKey == "" && c.SecretKey != "") { - return nil, fmt.Errorf("static AWS client credentials haven't been properly configured (the access key or secret key were provided but not both)") + return nil, ErrBadStaticCreds } - awsConfig, err := config.LoadDefaultConfig(ctx, c.generateAwsConfigOptions(opts)...) + awsConfig, err := config.LoadDefaultConfig(ctx, c.generateAwsConfigOptions(ctx, opts)...) if err != nil { - return nil, fmt.Errorf("failed to load SDK's default configurations with given credential options") + return nil, fmt.Errorf("%w: %w", ErrLoadConfigWithCredsFailed, err) } if opts.withCredentialsProvider != nil { diff --git a/awsutil/generate_credentials_test.go b/awsutil/generate_credentials_test.go index 2486799..b01d610 100644 --- a/awsutil/generate_credentials_test.go +++ b/awsutil/generate_credentials_test.go @@ -5,10 +5,10 @@ package awsutil import ( "bytes" - "context" "errors" "os" "path" + "slices" "testing" "github.com/aws/aws-sdk-go-v2/aws" @@ -90,7 +90,6 @@ func TestNewCredentialsConfig(t *testing.T) { }, } for _, tc := range cases { - tc := tc t.Run(tc.name, func(t *testing.T) { require := require.New(t) assert := assert.New(t) @@ -150,7 +149,6 @@ func TestRetrieveCreds(t *testing.T) { }, } for _, tc := range cases { - tc := tc t.Run(tc.name, func(t *testing.T) { require := require.New(t) assert := assert.New(t) @@ -159,7 +157,7 @@ func TestRetrieveCreds(t *testing.T) { require.NoError(err) require.NotNil(cfg) - awscfg, err := RetrieveCreds(context.Background(), "foo", "bar", "baz", nil, tc.opts...) + awscfg, err := RetrieveCreds(t.Context(), "foo", "bar", "baz", nil, tc.opts...) if tc.expectedErr != "" { require.Error(err) require.EqualError(err, tc.expectedErr) @@ -169,7 +167,7 @@ func TestRetrieveCreds(t *testing.T) { require.NoError(err) assert.NotNil(awscfg) - creds, err := awscfg.Credentials.Retrieve(context.Background()) + creds, err := awscfg.Credentials.Retrieve(t.Context()) require.NoError(err) assert.Equal("foo", creds.AccessKeyID) assert.Equal("bar", creds.SecretAccessKey) @@ -179,24 +177,35 @@ func TestRetrieveCreds(t *testing.T) { } func TestGenerateCredentialChain(t *testing.T) { + // Create a shared creds file with a default profile + dir := t.TempDir() + profileWithDefault := path.Join(dir, "profile_with_default") + f, err := os.Create(profileWithDefault) + require.NoError(t, err) + _, err = f.Write([]byte("[default]\nregion=us-east-2\n")) + require.NoError(t, err) + require.NoError(t, f.Close()) + cases := []struct { - name string - opts []Option - expectedErr string + name string + opts []Option + expectedErr error + ccModFunc func(cc *CredentialsConfig) + additionalAsserts func(t *testing.T, cfg *aws.Config) }{ { name: "static cred missing access key", opts: []Option{ WithSecretKey("foo"), }, - expectedErr: "static AWS client credentials haven't been properly configured (the access key or secret key were provided but not both)", + expectedErr: ErrBadStaticCreds, }, { name: "static cred missing secret key", opts: []Option{ WithAccessKey("foo"), }, - expectedErr: "static AWS client credentials haven't been properly configured (the access key or secret key were provided but not both)", + expectedErr: ErrBadStaticCreds, }, { name: "valid static cred", @@ -205,9 +214,26 @@ func TestGenerateCredentialChain(t *testing.T) { WithSecretKey("bar"), }, }, + { + // Note: Region won't match the profile's region because + // NewCredentialsConfig ignores config file's region + name: "creds from shared creds file", + ccModFunc: func(cc *CredentialsConfig) { + cc.Filename = profileWithDefault + }, + additionalAsserts: func(t *testing.T, cfg *aws.Config) { + isDefaultProfile := func(cfs any) bool { + configSource, ok := cfs.(config.SharedConfig) + if !ok { + return false + } + return configSource.Profile == defaultStr + } + assert.True(t, slices.ContainsFunc(cfg.ConfigSources, isDefaultProfile)) + }, + }, } for _, tc := range cases { - tc := tc t.Run(tc.name, func(t *testing.T) { require := require.New(t) assert := assert.New(t) @@ -216,15 +242,22 @@ func TestGenerateCredentialChain(t *testing.T) { require.NoError(err) require.NotNil(cfg) - awscfg, err := cfg.GenerateCredentialChain(context.Background()) - if tc.expectedErr != "" { - require.Error(err) - assert.ErrorContains(err, tc.expectedErr) + if tc.ccModFunc != nil { + tc.ccModFunc(cfg) + } + + awscfg, err := cfg.GenerateCredentialChain(t.Context()) + if tc.expectedErr != nil { + assert.ErrorIs(err, tc.expectedErr) assert.Nil(awscfg) return } require.NoError(err) assert.NotNil(awscfg) + + if tc.additionalAsserts != nil { + tc.additionalAsserts(t, awscfg) + } }) } } @@ -239,6 +272,28 @@ func TestGenerateAwsConfigOptions(t *testing.T) { require.NoError(t, err) require.NoError(t, f.Close()) + // Create a shared creds file with a default "profile" + // because this is a creds file, it doesn't use the profile keyword but is + // otherwise treated the same as a config file + profileWithDefault := path.Join(dir, "profile_with_default") + f2, err := os.Create(profileWithDefault) + require.NoError(t, err) + _, err = f2.Write([]byte("[default]\nregion=us-west-1\n")) + require.NoError(t, err) + require.NoError(t, f2.Close()) + + // Check for default profile in ~/.aws/config because "empty shared profile adds default profile without shared file" + // fails if there is not a default profile present + emptySharedProfileExpectedProfile := "" + home, err := os.UserHomeDir() + require.NoError(t, err) + bs, err := os.ReadFile(path.Join(home, ".aws", "config")) + if err == nil { + if bytes.Contains(bs, []byte("[profile default]")) { + emptySharedProfileExpectedProfile = defaultStr + } + } + cases := []struct { name string cfg *CredentialsConfig @@ -304,6 +359,47 @@ func TestGenerateAwsConfigOptions(t *testing.T) { SharedCredentialsFiles: []string{"foobaz"}, }, }, + { + // See the setup above for emptySharedProfileExpectedProfile + // This tests that the `SharedConfigProfileNotExistError" check works + // when the default profile lives in the usual ~/.aws/config file + name: "empty shared profile adds default profile without shared file", + cfg: func() *CredentialsConfig { + credCfg, err := NewCredentialsConfig() + require.NoError(t, err) + credCfg.Profile = "" + return credCfg + }(), + opts: options{ + withSharedCredentials: true, + }, + expectedLoadOptions: config.LoadOptions{ + SharedConfigProfile: emptySharedProfileExpectedProfile, + SharedCredentialsFiles: []string{""}, + Region: "us-east-1", + }, + }, + { + // This tests that the `SharedConfigProfileNotExistError" check works + // when the default profile lives in a credentials file + name: "empty shared profile adds default profile with shared file", + cfg: func() *CredentialsConfig { + credCfg, err := NewCredentialsConfig() + require.NoError(t, err) + credCfg.Filename = profileWithDefault + return credCfg + }(), + opts: options{ + withSharedCredentials: true, + }, + expectedLoadOptions: config.LoadOptions{ + SharedConfigProfile: "default", + SharedCredentialsFiles: []string{profileWithDefault}, + // Because the profiles aren't actually consumed, the + // region is still the default us-east-1 + Region: "us-east-1", + }, + }, { name: "web identity token file credential", cfg: func() *CredentialsConfig { @@ -391,11 +487,10 @@ func TestGenerateAwsConfigOptions(t *testing.T) { }, } for _, tc := range cases { - tc := tc t.Run(tc.name, func(t *testing.T) { require := require.New(t) assert := assert.New(t) - opts := tc.cfg.generateAwsConfigOptions(tc.opts) + opts := tc.cfg.generateAwsConfigOptions(t.Context(), tc.opts) cfgLoadOpts := config.LoadOptions{} for _, f := range opts { require.NoError(f(&cfgLoadOpts)) @@ -430,7 +525,7 @@ func TestGenerateAwsConfigOptions(t *testing.T) { if tc.expectedStaticCredentials != nil { require.NotNil(cfgLoadOpts.Credentials) - actualCreds, err := cfgLoadOpts.Credentials.Retrieve(context.Background()) + actualCreds, err := cfgLoadOpts.Credentials.Retrieve(t.Context()) require.NoError(err) assert.Equal(tc.expectedStaticCredentials.AccessKeyID, actualCreds.AccessKeyID) assert.Equal(tc.expectedStaticCredentials.SecretAccessKey, actualCreds.SecretAccessKey) diff --git a/awsutil/go.mod b/awsutil/go.mod index 8a93986..f915062 100644 --- a/awsutil/go.mod +++ b/awsutil/go.mod @@ -1,6 +1,6 @@ module github.com/hashicorp/go-secure-stdlib/awsutil/v2 -go 1.23.3 +go 1.24 require ( github.com/aws/aws-sdk-go-v2 v1.32.5 @@ -27,7 +27,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect diff --git a/awsutil/go.sum b/awsutil/go.sum index f19f850..4180e7b 100644 --- a/awsutil/go.sum +++ b/awsutil/go.sum @@ -1,55 +1,29 @@ -github.com/aws/aws-sdk-go-v2 v1.20.1 h1:rZBf5DWr7YGrnlTK4kgDQGn1ltqOg5orCYb/UhOFZkg= -github.com/aws/aws-sdk-go-v2 v1.20.1/go.mod h1:NU06lETsFm8fUC6ZjhgDpVBcGZTFQ6XM+LZWZxMI4ac= github.com/aws/aws-sdk-go-v2 v1.32.5 h1:U8vdWJuY7ruAkzaOdD7guwJjD06YSKmnKCJs7s3IkIo= github.com/aws/aws-sdk-go-v2 v1.32.5/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.18.33 h1:JKcw5SFxFW/rpM4mOPjv0VQ11E2kxW13F3exWOy7VZU= -github.com/aws/aws-sdk-go-v2/config v1.18.33/go.mod h1:hXO/l9pgY3K5oZJldamP0pbZHdPqqk+4/maa7DSD3cA= github.com/aws/aws-sdk-go-v2/config v1.28.5 h1:Za41twdCXbuyyWv9LndXxZZv3QhTG1DinqlFsSuvtI0= github.com/aws/aws-sdk-go-v2/config v1.28.5/go.mod h1:4VsPbHP8JdcdUDmbTVgNL/8w9SqOkM5jyY8ljIxLO3o= -github.com/aws/aws-sdk-go-v2/credentials v1.13.32 h1:lIH1eKPcCY1ylR4B6PkBGRWMHO3aVenOKJHWiS4/G2w= -github.com/aws/aws-sdk-go-v2/credentials v1.13.32/go.mod h1:lL8U3v/Y79YRG69WlAho0OHIKUXCyFvSXaIvfo81sls= github.com/aws/aws-sdk-go-v2/credentials v1.17.46 h1:AU7RcriIo2lXjUfHFnFKYsLCwgbz1E7Mm95ieIRDNUg= github.com/aws/aws-sdk-go-v2/credentials v1.17.46/go.mod h1:1FmYyLGL08KQXQ6mcTlifyFXfJVCNJTVGuQP4m0d/UA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.8 h1:DK/9C+UN/X+1+Wm8pqaDksQr2tSLzq+8X1/rI/ZxKEQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.8/go.mod h1:ce7BgLQfYr5hQFdy67oX2svto3ufGtm6oBvmsHScI1Q= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 h1:sDSXIrlsFSFJtWKLQS4PUWRvrT580rrnuLydJrCQ/yA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20/go.mod h1:WZ/c+w0ofps+/OUqMwWgnfrgzZH1DZO1RIkktICsqnY= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.38 h1:c8ed/T9T2K5I+h/JzmF5tpI46+OODQ74dzmdo+QnaMg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.38/go.mod h1:qggunOChCMu9ZF/UkAfhTz25+U2rLVb3ya0Ua6TTfCA= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 h1:4usbeaes3yJnCFC7kfeyhkdkPtoRYPa/hTmCqMpKpLI= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24/go.mod h1:5CI1JemjVwde8m2WG3cz23qHKPOxbpkq0HaoreEgLIY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.32 h1:hNeAAymUY5gu11WrrmFb3CVIp9Dar9hbo44yzzcQpzA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.32/go.mod h1:0ZXSqrty4FtQ7p8TEuRde/SZm9X05KT18LAUlR40Ln0= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 h1:N1zsICrQglfzaBnrfM0Ys00860C+QFwu6u/5+LomP+o= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24/go.mod h1:dCn9HbJ8+K31i8IQ8EWmWj0EiIk0+vKiHNMxTTYveAg= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.39 h1:fc0ukRAiP1syoSGZYu+DaE+FulSYhTiJ8WpVu5jElU4= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.39/go.mod h1:WLAW8PT7+JhjZfLSWe7WEJaJu0GNo0cKc2Zyo003RBs= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/iam v1.22.2 h1:DPFxx/6Zwes/MiadlDteVqDKov7yQ5v9vuwfhZuJm1s= -github.com/aws/aws-sdk-go-v2/service/iam v1.22.2/go.mod h1:cQTMNdo/Z5t1DDRsUnx0a2j6cPnytMBidUYZw2zks28= github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 h1:hfkzDZHBp9jAT4zcd5mtqckpU4E3Ax0LQaEWWk1VgN8= github.com/aws/aws-sdk-go-v2/service/iam v1.38.1/go.mod h1:u36ahDtZcQHGmVm/r+0L1sfKX4fzLEMdCqiKRKkUMVM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.32 h1:dGAseBFEYxth10V23b5e2mAS+tX7oVbfYHD6dnDdAsg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.32/go.mod h1:4jwAWKEkCR0anWk5+1RbfSg1R5Gzld7NLiuaq5bTR/Y= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwrSbwhECWQoI/g6WM9zqCcSpHDJIWSbMLOu4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.2 h1:A2RlEMo4SJSwbNoUUgkxTAEMduAy/8wG3eB2b2lP4gY= -github.com/aws/aws-sdk-go-v2/service/sso v1.13.2/go.mod h1:ju+nNXUunfIFamXUIZQiICjnO/TPlOmWcYhZcSy7xaE= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.2 h1:OJELEgyaT2kmaBGZ+myyZbTTLobfe3ox3FSh5eYK9Qs= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.2/go.mod h1:ubDBBaDFs1GHijSOTi8ljppML15GLG0HxhILtbjNNYQ= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5/go.mod h1:ORITg+fyuMoeiQFiVGoqB3OydVTLkClw/ljbblMq6Cc= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.2 h1:ympg1+Lnq33XLhcK/xTG4yZHPs1Oyxu+6DEWbl7qOzA= -github.com/aws/aws-sdk-go-v2/service/sts v1.21.2/go.mod h1:FQ/DQcOfESELfJi5ED+IPPAjI5xC6nxtSolVVB773jM= github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 h1:6SZUVRQNvExYlMLbHdlKB48x0fLbc2iVROyaNEwBHbU= github.com/aws/aws-sdk-go-v2/service/sts v1.33.1/go.mod h1:GqWyYCwLXnlUB1lOAXQyNSPqPLQJvmo8J0DWBzp9mtg= -github.com/aws/smithy-go v1.14.1 h1:EFKMUmH/iHMqLiwoEDx2rRjRQpI1YCn5jTysoaDujFs= -github.com/aws/smithy-go v1.14.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -58,22 +32,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -106,6 +73,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=