Skip to content

azure-instance-identity authentication uses different instance_id than provisioner #3315

@spikecurtis

Description

@spikecurtis

when using the azurerm terraform provider, the coder provisioner returns an instance_id like

/subscriptions/05e8b285-4ce1-46a3-b4c9-f51ba67d6acc/resourceGroups/coder-spike-spikeaz-resources/providers/Microsoft.Compute/virtualMachines/coder-spike-spikeaz-vm

However the Coder Agent, using the Azure metadata service, calls Coder Server with vmId like: 90c8eeb0-597a-4df8-8ab6-dc25521d0989

This is rejected by Coder Server.

2022-07-29 17:58:40.865 [WARN]	<./cli/agent.go:152>	workspaceAgent.func1	authenticate workspace	{"method": "azure-instance-identity", "error": "POST https://fccac451dc692c5a665d211025e3015e.pit-1.try.coder.app/api/v2/workspaceagents/azure-instance-identity: unexpected status code 404: Instance with id \"90c8eeb0-597a-4df8-8ab6-dc25521d0989\" not found."}

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions