diff --git a/docs/resources/agent_instance.md b/docs/resources/agent_instance.md index fa8574fa..6af2bb46 100644 --- a/docs/resources/agent_instance.md +++ b/docs/resources/agent_instance.md @@ -3,7 +3,7 @@ page_title: "coder_agent_instance Resource - terraform-provider-coder" subcategory: "" description: |- - Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for "googlecomputeinstance", "awsinstance", "azurermlinuxvirtualmachine", and "azurermwindowsvirtual_machine" resources. + Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for "google_compute_instance", "aws_instance", "azurerm_linux_virtual_machine", and "azurerm_windows_virtual_machine" resources. --- # coder_agent_instance (Resource) diff --git a/provider/provisioner.go b/provider/provisioner.go index 49d8f401..314e89cd 100644 --- a/provider/provisioner.go +++ b/provider/provisioner.go @@ -16,6 +16,10 @@ func provisionerDataSource() *schema.Resource { rd.SetId(uuid.NewString()) rd.Set("os", runtime.GOOS) rd.Set("arch", runtime.GOARCH) + // Fix for #11782: if we're on 32-bit ARM, set arch to armv7. + if runtime.GOARCH == "arm" { + rd.Set("arch", "armv7") + } return nil }, diff --git a/provider/provisioner_test.go b/provider/provisioner_test.go index 777006f7..e9f83e43 100644 --- a/provider/provisioner_test.go +++ b/provider/provisioner_test.go @@ -31,9 +31,14 @@ func TestProvisioner(t *testing.T) { attribs := resource.Primary.Attributes require.Equal(t, runtime.GOOS, attribs["os"]) - require.Equal(t, runtime.GOARCH, attribs["arch"]) + if runtime.GOARCH == "arm" { + require.Equal(t, "armv7", attribs["arch"]) + } else { + require.Equal(t, runtime.GOARCH, attribs["arch"]) + } return nil }, }}, }) } +