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

docs: update org resource#151

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
ethanndickson merged 1 commit intomainfromethan/org-docs
Dec 5, 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 deletionREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ The provider currently supports resources and data sources for:
- Templates + Template Versions
- Groups
- Workspace Proxies
- Organizations (Data Source only)
- Organizations

## Requirements

Expand Down
26 changes: 20 additions & 6 deletionsdocs/resources/organization.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,12 +3,17 @@
page_title: "coderd_organization Resource - terraform-provider-coderd"
subcategory: ""
description: |-
An organization on the Coder deployment
An organization on the Coder deployment.
~> Warning
This resource is only compatible with Coder version 2.16.0 https://github.com/coder/coder/releases/tag/v2.16.0 and later.
---

# coderd_organization (Resource)

An organization on the Coder deployment
An organization on the Coder deployment.

~> **Warning**
This resource is only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Verified by running the tests against a2.16.0 image.




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

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

### Read-Only

Expand DownExpand Up@@ -55,6 +60,15 @@ Optional:
Import is supported using the following syntax:

```shell
# Organizations can be imported by their name
terraform import coderd_organization.our_org our_org
# The ID supplied can be either a organization UUID retrieved via the API
# or the name of the organization.
$ terraform import coderd_organization.our_org our-org
```
Alternatively, in Terraform v1.5.0 and later, an [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used:

```terraform
import {
to = coderd_organization.our_org
id = "our-org"
}
```
13 changes: 11 additions & 2 deletionsexamples/resources/coderd_organization/import.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
# Organizations can be imported by their name
terraform import coderd_organization.our_org our_org
# The ID supplied can be either a organization UUID retrieved via the API
# or the name of the organization.
$ terraform import coderd_organization.our_org our-org
```
Alternatively, in Terraform v1.5.0 and later, an [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used:

```terraform
import {
to = coderd_organization.our_org
id = "our-org"
}
7 changes: 6 additions & 1 deletioninternal/provider/organization_resource.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -94,8 +94,11 @@ func (r *OrganizationResource) Metadata(ctx context.Context, req resource.Metada

func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription:"An organization on the Coder deployment",
MarkdownDescription:`An organization on the Coder deployment.

~> **Warning**
This resource is only compatible with Coder version [2.16.0](https://github.com/coder/coder/releases/tag/v2.16.0) and later.
`,
Attributes: map[string]schema.Attribute{
"id": schema.StringAttribute{
CustomType: UUIDType,
Expand DownExpand Up@@ -135,6 +138,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe

Blocks: map[string]schema.Block{
"group_sync": schema.SingleNestedBlock{
MarkdownDescription: `Group sync settings to sync groups from an IdP.`,
Attributes: map[string]schema.Attribute{
"field": schema.StringAttribute{
Optional: true,
Expand DownExpand Up@@ -167,6 +171,7 @@ func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRe
},
},
"role_sync": schema.SingleNestedBlock{
MarkdownDescription: `Role sync settings to sync organization roles from an IdP.`,
Attributes: map[string]schema.Attribute{
"field": schema.StringAttribute{
Optional: true,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp