Skip to content

Commit 919e15f

Browse files
committed
test(examples): add system assigned type
1 parent a6331d0 commit 919e15f

File tree

1 file changed

+6
-1
lines changed
  • examples/entraid/managedidentity_systemassigned_min

1 file changed

+6
-1
lines changed

examples/entraid/managedidentity_systemassigned_min/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"config"
1111

1212
entraid "github.com/redis/go-redis-entraid"
13+
"github.com/redis/go-redis-entraid/identity"
1314
"github.com/redis/go-redis/v9"
1415
)
1516

@@ -23,7 +24,11 @@ func main() {
2324
}
2425

2526
// Create a managed identity credentials provider for system-assigned identity
26-
cp, err := entraid.NewManagedIdentityCredentialsProvider(entraid.ManagedIdentityCredentialsProviderOptions{})
27+
cp, err := entraid.NewManagedIdentityCredentialsProvider(entraid.ManagedIdentityCredentialsProviderOptions{
28+
ManagedIdentityProviderOptions: identity.ManagedIdentityProviderOptions{
29+
ManagedIdentityType: identity.SystemAssignedIdentity,
30+
},
31+
})
2732
if err != nil {
2833
log.Fatalf("Failed to create credentials provider: %v", err)
2934
}

0 commit comments

Comments
 (0)