From 63766c1fb8593813a9f8ea6dc97a99d9d7c66c66 Mon Sep 17 00:00:00 2001 From: hugoShaka Date: Fri, 26 Jul 2024 11:42:38 -0400 Subject: [PATCH] use v16 client.Expiry() function --- integrations/terraform/provider/credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/terraform/provider/credentials.go b/integrations/terraform/provider/credentials.go index 0e6a26804ad65..e38eab6233c7e 100644 --- a/integrations/terraform/provider/credentials.go +++ b/integrations/terraform/provider/credentials.go @@ -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.`,