Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a92084d

Browse files
docs: update org resource (#151)
Output can be previewed by pasting the markdown into https://registry.terraform.io/tools/doc-preview
1 parent 283e3cc commit a92084d

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The provider currently supports resources and data sources for:
77
- Templates + Template Versions
88
- Groups
99
- Workspace Proxies
10-
- Organizations (Data Source only)
10+
- Organizations
1111

1212
## Requirements
1313

docs/resources/organization.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
page_title: "coderd_organization Resource - terraform-provider-coderd"
44
subcategory: ""
55
description: |-
6-
An organization on the Coder deployment
6+
An organization on the Coder deployment.
7+
~> Warning
8+
This resource is only compatible with Coder version 2.16.0 https://github.com/coder/coder/releases/tag/v2.16.0 and later.
79
---
810

911
# coderd_organization (Resource)
1012

11-
An organization on the Coder deployment
13+
An organization on the Coder deployment.
14+
15+
~> **Warning**
16+
This resource is only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.
1217

1318

1419

@@ -23,9 +28,9 @@ An organization on the Coder deployment
2328

2429
- `description` (String)
2530
- `display_name` (String) Display name of the organization. Defaults to name.
26-
- `group_sync` (Block, Optional) (see [below for nested schema](#nestedblock--group_sync))
31+
- `group_sync` (Block, Optional) Group sync settings to sync groups from an IdP. (see [below for nested schema](#nestedblock--group_sync))
2732
- `icon` (String)
28-
- `role_sync` (Block, Optional) (see [below for nested schema](#nestedblock--role_sync))
33+
- `role_sync` (Block, Optional) Role sync settings to sync organization roles from an IdP. (see [below for nested schema](#nestedblock--role_sync))
2934

3035
### Read-Only
3136

@@ -55,6 +60,15 @@ Optional:
5560
Import is supported using the following syntax:
5661

5762
```shell
58-
# Organizations can be imported by their name
59-
terraform import coderd_organization.our_org our_org
63+
# The ID supplied can be either a organization UUID retrieved via the API
64+
# or the name of the organization.
65+
$ terraform import coderd_organization.our_org our-org
66+
```
67+
Alternatively, in Terraform v1.5.0 and later, an [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used:
68+
69+
```terraform
70+
import {
71+
to = coderd_organization.our_org
72+
id = "our-org"
73+
}
6074
```
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
# Organizations can be imported by their name
2-
terraform import coderd_organization.our_org our_org
1+
# The ID supplied can be either a organization UUID retrieved via the API
2+
# or the name of the organization.
3+
$ terraform import coderd_organization.our_org our-org
4+
```
5+
Alternatively, in Terraform v1.5.0 and later, an [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used:
6+
7+
```terraform
8+
import {
9+
to = coderd_organization.our_org
10+
id = "our-org"
11+
}

internal/provider/organization_resource.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,11 @@ func (r *OrganizationResource) Metadata(ctx context.Context, req resource.Metada
9494

9595
func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
9696
resp.Schema = schema.Schema{
97-
MarkdownDescription: "An organization on the Coder deployment",
97+
MarkdownDescription: `An organization on the Coder deployment.
9898
99+
~> **Warning**
100+
This resource is only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.
101+
`,
99102
Attributes: map[string]schema.Attribute{
100103
"id": schema.StringAttribute{
101104
CustomType: UUIDType,
@@ -135,6 +138,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
135138

136139
Blocks: map[string]schema.Block{
137140
"group_sync": schema.SingleNestedBlock{
141+
MarkdownDescription: `Group sync settings to sync groups from an IdP.`,
138142
Attributes: map[string]schema.Attribute{
139143
"field": schema.StringAttribute{
140144
Optional: true,
@@ -167,6 +171,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
167171
},
168172
},
169173
"role_sync": schema.SingleNestedBlock{
174+
MarkdownDescription: `Role sync settings to sync organization roles from an IdP.`,
170175
Attributes: map[string]schema.Attribute{
171176
"field": schema.StringAttribute{
172177
Optional: true,

0 commit comments

Comments
 (0)