Skip to content

Commit

Permalink
roachprod: respect AWS_PROFILE env var
Browse files Browse the repository at this point in the history
Previously, if the AWS_PROFILE env var was set roachprod did not forward it to
the `aws cli`. This changes automatically sets the profile to the AWS_PROFILE
env var if it is not specified via the `--aws-profile` roachprod flag.

Epic: None
Release note: None
  • Loading branch information
herkolategan committed Dec 13, 2024
1 parent fada042 commit 4ace523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/roachprod/vm/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func (o *ProviderOpts) ConfigureCreateFlags(flags *pflag.FlagSet) {

// ConfigureClusterFlags implements vm.ProviderOpts.
func (o *ProviderOpts) ConfigureClusterFlags(flags *pflag.FlagSet, _ vm.MultipleProjectsOption) {
flags.StringVar(&providerInstance.Profile, ProviderName+"-profile", providerInstance.Profile,
flags.StringVar(&providerInstance.Profile, ProviderName+"-profile", os.Getenv("AWS_PROFILE"),
"Profile to manage cluster in")
configFlagVal := awsConfigValue{awsConfig: *DefaultConfig}
providerInstance.Config = &configFlagVal.awsConfig
Expand Down

0 comments on commit 4ace523

Please sign in to comment.