Skip to content

Commit

Permalink
fixup! Address marco's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoShaka committed Jul 23, 2024
1 parent 5d3f724 commit 3d40ed6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions integrations/terraform/provider/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (s CredentialSources) ActiveSources(ctx context.Context, config providerDat
// As trying broken credentials takes 30 seconds this is a very bad UX and we should get rid of this.
// Credentials from profile are not passing MFA4Admin anyway.
summary := inactiveReason.String() +
"\n\n The provider will attempt to use your current local profile (this behaviour is deprecated and will be removed in v17, you should specify the profile name or directory)."
"\nThe provider will fallback to your current local profile (this behaviour is deprecated and will be removed in v17, you should specify the profile name or directory)."
return CredentialSources{CredentialsFromProfile{isDefault: true}}, diag.Diagnostics{diag.NewWarningDiagnostic(
"No active Teleport credentials source found",
summary,
Expand Down Expand Up @@ -419,8 +419,12 @@ type CredentialsFromProfile struct {
}

// Name implements CredentialSource and returns the source name.
func (CredentialsFromProfile) Name() string {
return "from the local profile"
func (c CredentialsFromProfile) Name() string {
name := "from the local profile"
if c.isDefault {
name += " (default)"
}
return name
}

// IsActive implements CredentialSource and returns if the source is active and why.
Expand Down

0 comments on commit 3d40ed6

Please sign in to comment.