Skip to content

Commit cfe5cb3

Browse files
committed
docs: udpate org resource
1 parent 283e3cc commit cfe5cb3

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@
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.12.0 https://github.com/coder/coder/releases/tag/v2.12.0 and later.
9+
Thegroup_sync and role_sync blocks are only compatible with Coder version 2.16.0 https://github.com/coder/coder/releases/tag/v2.16.0 and later.
710
---
811

912
# coderd_organization (Resource)
1013

11-
An organization on the Coder deployment
14+
An organization on the Coder deployment.
15+
16+
~> **Warning**
17+
This resource is only compatible with Coder version [2.12.0](https://github.com/coder/coder/releases/tag/v2.12.0) and later.
18+
The`group_sync` and `role_sync` blocks are only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.
1219

1320

1421

@@ -23,9 +30,9 @@ An organization on the Coder deployment
2330

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

3037
### Read-Only
3138

@@ -55,6 +62,15 @@ Optional:
5562
Import is supported using the following syntax:
5663

5764
```shell
58-
# Organizations can be imported by their name
59-
terraform import coderd_organization.our_org our_org
65+
# The ID supplied can be either a organization UUID retrieved via the API
66+
# or the name of the organization.
67+
$ terraform import coderd_organization.our_org our-org
68+
```
69+
Alternatively, in Terraform v1.5.0 and later, an [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used:
70+
71+
```terraform
72+
import {
73+
to = coderd_organization.our_org
74+
id = "our-org"
75+
}
6076
```
Lines changed: 11 additions & 2 deletions
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

Lines changed: 6 additions & 1 deletion
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.12.0](https://github.com/coder/coder/releases/tag/v2.12.0) and later.
101+
The` + "`group_sync` and `role_sync` blocks are only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.",
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy