MCPcopy Index your code
hub / github.com/coder/coder / WithAzureInstanceIdentity

Function WithAzureInstanceIdentity

codersdk/agentsdk/azure.go:27–34  ·  view source on GitHub ↗
(opts ...InstanceIdentityOption)

Source from the content-addressed store, hash-verified

25}
26
27func WithAzureInstanceIdentity(opts ...InstanceIdentityOption) SessionTokenSetup {
28 cfg := applyInstanceIdentityOptions(opts)
29 return func(client *codersdk.Client) RefreshableSessionTokenProvider {
30 return &InstanceIdentitySessionTokenProvider{
31 TokenExchanger: &AzureSessionTokenExchanger{client: client, agentName: cfg.AgentName},
32 }
33 }
34}
35
36// AuthWorkspaceAzureInstanceIdentity uses the Azure Instance Metadata Service to
37// fetch a signed payload, and exchange it for a session token for a workspace agent.

Calls 1