Skip to content

Commit 6db84bf

Browse files
kylecarbsbpmct
andcommitted
Update internal/provider/provider.go
Co-authored-by: Ben Potter <me@bpmct.net>
1 parent 29a3231 commit 6db84bf

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

docs/data-sources/host.md

-24
This file was deleted.

docs/data-sources/provisioner.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "coder_provisioner Data Source - terraform-provider-coder"
4+
subcategory: ""
5+
description: |-
6+
Use this data source to get information about the Coder provisioner.
7+
---
8+
9+
# coder_provisioner (Data Source)
10+
11+
Use this data source to get information about the Coder provisioner.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Read-Only
19+
20+
- `arch` (String) The architecture of the host. This exposes `runtime.GOARCH` (see https://pkg.go.dev/runtime#pkg-constants).
21+
- `id` (String) The ID of this resource.
22+
- `os` (String) The operating system of the host. This exposes `runtime.GOOS` (see https://pkg.go.dev/runtime#pkg-constants).
23+
24+

internal/provider/provider.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ func New() *schema.Provider {
151151
},
152152
},
153153
},
154-
"coder_host": {
155-
Description: "Use this data source to get information about the host.",
154+
"coder_provisioner": {
155+
Description: "Use this data source to get information about the Coder provisioner.",
156156
ReadContext: func(c context.Context, rd *schema.ResourceData, i interface{}) diag.Diagnostics {
157157
rd.SetId(uuid.NewString())
158158
rd.Set("os", runtime.GOOS)
@@ -164,12 +164,12 @@ func New() *schema.Provider {
164164
"os": {
165165
Type: schema.TypeString,
166166
Computed: true,
167-
Description: "The operating system of the host.",
167+
Description: "The operating system of the host. This exposes `runtime.GOOS` (see https://pkg.go.dev/runtime#pkg-constants).",
168168
},
169169
"arch": {
170170
Type: schema.TypeString,
171171
Computed: true,
172-
Description: "The architecture of the host.",
172+
Description: "The architecture of the host. This exposes `runtime.GOARCH` (see https://pkg.go.dev/runtime#pkg-constants).",
173173
},
174174
},
175175
},

internal/provider/provider_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestWorkspace(t *testing.T) {
5353
})
5454
}
5555

56-
func TestHost(t *testing.T) {
56+
func TestProvisioner(t *testing.T) {
5757
resource.Test(t, resource.TestCase{
5858
Providers: map[string]*schema.Provider{
5959
"coder": provider.New(),
@@ -63,12 +63,12 @@ func TestHost(t *testing.T) {
6363
Config: `
6464
provider "coder" {
6565
}
66-
data "coder_host" "me" {
66+
data "coder_provisioner" "me" {
6767
}`,
6868
Check: func(state *terraform.State) error {
6969
require.Len(t, state.Modules, 1)
7070
require.Len(t, state.Modules[0].Resources, 1)
71-
resource := state.Modules[0].Resources["data.coder_host.me"]
71+
resource := state.Modules[0].Resources["data.coder_provisioner.me"]
7272
require.NotNil(t, resource)
7373

7474
attribs := resource.Primary.Attributes

0 commit comments

Comments
 (0)