Skip to content

Commit 5e32993

Browse files
authored
Refresh default creds (#210)
See chainguard-dev/terraform-provider-apko#435 Signed-off-by: Jon Johnson <[email protected]>
1 parent e0b2d51 commit 5e32993

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/provider/provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package provider
22

33
import (
44
"context"
5+
"time"
56

67
"github.com/google/go-containerregistry/pkg/authn"
78
"github.com/google/go-containerregistry/pkg/v1/google"
@@ -69,7 +70,7 @@ func (p *OCIProvider) Configure(ctx context.Context, req provider.ConfigureReque
6970
return
7071
}
7172

72-
kc := authn.NewMultiKeychain(google.Keychain, authn.DefaultKeychain)
73+
kc := authn.NewMultiKeychain(google.Keychain, authn.RefreshingKeychain(authn.DefaultKeychain, 30*time.Minute))
7374
ropts := []remote.Option{remote.WithAuthFromKeychain(kc), remote.WithUserAgent("terraform-provider-oci")}
7475

7576
// These errors are impossible in current impl, but we can't return an err, so panic.

0 commit comments

Comments
 (0)