Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(provider): coalesce arch to armv7 if on 32-bit arm#210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 3 commits intomainfromcj/armv7
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletiondocs/resources/agent_instance.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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.
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

review:make gen changed this

---

# coder_agent_instance (Resource)
Expand Down
4 changes: 4 additions & 0 deletionsprovider/provisioner.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
},
Expand Down
7 changes: 6 additions & 1 deletionprovider/provisioner_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
},
}},
})
}


[8]ページ先頭

©2009-2025 Movatter.jp