Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cli/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ var _upCmd = &cobra.Command{
exit.Error(err)
}

cacheAWSCredentials(awsCreds, accessConfig)

clusterState, err := clusterstate.GetClusterState(awsClient, &accessConfig)
if err != nil {
exit.Error(err)
Expand Down Expand Up @@ -294,8 +296,6 @@ var _upCmd = &cobra.Command{
exit.Error(errors.Append(err, fmt.Sprintf("unable to configure cli environment; you can attempt to resolve this issue and configure your CLI environment by running `cortex cluster info --env %s`", _flagClusterEnv)))
}

cacheAWSCredentials(awsCreds, accessConfig)

fmt.Printf(console.Bold("\nan environment named \"%s\" has been configured for this cluster; append `--env %s` to cortex commands to connect to it (e.g. `cortex deploy --env %s`), or set it as your default with `cortex env default %s`\n"), _flagClusterEnv, _flagClusterEnv, _flagClusterEnv, _flagClusterEnv)
},
}
Expand Down Expand Up @@ -332,6 +332,8 @@ var _configureCmd = &cobra.Command{
exit.Error(err)
}

cacheAWSCredentials(awsCreds, *accessConfig)

awsClient, err := newAWSClient(*accessConfig.Region, awsCreds)
if err != nil {
exit.Error(err)
Expand Down Expand Up @@ -364,8 +366,6 @@ var _configureCmd = &cobra.Command{
fmt.Println(helpStr)
exit.Error(ErrorClusterConfigure(out + helpStr))
}

cacheAWSCredentials(awsCreds, *accessConfig)
},
}

Expand Down Expand Up @@ -400,13 +400,13 @@ var _infoCmd = &cobra.Command{
exit.Error(err)
}

cacheAWSCredentials(awsCreds, *accessConfig)

if _flagClusterInfoDebug {
cmdDebug(awsCreds, accessConfig)
} else {
cmdInfo(awsCreds, accessConfig, _flagClusterDisallowPrompt)
}

cacheAWSCredentials(awsCreds, *accessConfig)
},
}

Expand Down