Skip to content

Commit

Permalink
use v16 client.Expiry() function
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoShaka committed Aug 1, 2024
1 parent 43429be commit 7852fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integrations/terraform/provider/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (s CredentialSources) BuildClient(ctx context.Context, clientCfg client.Con
}

now := time.Now()
if expiry, ok := creds.Expiry(); ok && !expiry.IsZero() && expiry.Before(now) {
if expiry, ok := client.Expiry(creds); ok && !expiry.IsZero() && expiry.Before(now) {
diags.AddWarning(
fmt.Sprintf("Teleport credentials %s are expired", source.Name()),
fmt.Sprintf(`The credentials %s are expired. Expiration is %q while current time is %q). You might need to refresh them. The provider will not attempt to use those credentials.`,
Expand Down

0 comments on commit 7852fa3

Please sign in to comment.