Skip to content

Commit

Permalink
Merge pull request #54 from blackbx/change-aws-config-to-match-sdk
Browse files Browse the repository at this point in the history
Change AWS config vars to match AWS CLI
  • Loading branch information
alistairjudson authored Feb 1, 2021
2 parents 87a78be + cedabdc commit ab0d1c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions awscfg/awscfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
var Service = dependency.Service{
Name: "aws-cfg",
ConfigFunc: func(set dependency.FlagSet) {
set.String("aws-access-key", "", "The key to use to communicate")
set.String("aws-access-key-id", "", "The key to use to communicate")
set.String("aws-mfa-serial-number", "", "The mfa serial number to communicate to AWS with")
set.String("aws-region", "eu-west-1", "The AWS region that we are accessing resources in")
set.String("aws-default-region", "eu-west-1", "The AWS region that we are accessing resources in")
set.String("aws-role-arn", "", "The AWS Role ARN to use to communicate to AWS with")
set.String("aws-secret-key", "", "The secret key associated with the access key, to use to communicate to AWS")
set.String("aws-secret-access-key", "", "The secret key associated with the access key, to use to communicate to AWS")
set.String("aws-session-token", "", "The session token to use to communicate to AWS with")
set.String("aws-endpoint-url", "", "The endpoint URL that is used as AWSs API endpoint")
},
Expand All @@ -24,11 +24,11 @@ var Service = dependency.Service{
// NewAWSCfg configures an aws.Config with the given dependency.ConfigGetter
func NewAWSCfg(config dependency.ConfigGetter) aws.Config {
return aws.Config{
AccessKey: config.GetString("aws-access-key"),
AccessKey: config.GetString("aws-access-key-id"),
MFASerialNumber: config.GetString("aws-mfa-serial-number"),
Region: config.GetString("aws-region"),
Region: config.GetString("aws-default-region"),
RoleARN: config.GetString("aws-role-arn"),
SecretKey: config.GetString("aws-secret-key"),
SecretKey: config.GetString("aws-secret-access-key"),
SessionToken: config.GetString("aws-session-token"),
EndpointURL: pointer.ToStringOrNil(config.GetString("aws-endpoint-url")),
}
Expand Down

0 comments on commit ab0d1c8

Please sign in to comment.