-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: workspace member resource and workspace member and workspace me…
…mbers data source
- Loading branch information
Showing
28 changed files
with
1,870 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "anthropic_workspace_member Data Source - terraform-provider-anthropic" | ||
subcategory: "" | ||
description: |- | ||
Get a member of a Workspace. | ||
--- | ||
|
||
# anthropic_workspace_member (Data Source) | ||
|
||
Get a member of a Workspace. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "anthropic_workspace_member" "example" { | ||
workspace_id = "wrkspc_xxxxx" | ||
user_id = "user_xxxxx" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `user_id` (String) ID of the user who is a member of the Workspace. | ||
- `workspace_id` (String) ID of the Workspace to which the member belongs. | ||
|
||
### Read-Only | ||
|
||
- `workspace_role` (String) Role of the new Workspace Member. Must be one of `workspace_user`, `workspace_developer`, or `workspace_admin`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "anthropic_workspace_members Data Source - terraform-provider-anthropic" | ||
subcategory: "" | ||
description: |- | ||
List all members of the workspace. | ||
--- | ||
|
||
# anthropic_workspace_members (Data Source) | ||
|
||
List all members of the workspace. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "anthropic_workspace_members" "example" { | ||
id = "wrkspc_xxxxx" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) ID of the Workspace. | ||
|
||
### Read-Only | ||
|
||
- `members` (Attributes Set) List of members. (see [below for nested schema](#nestedatt--members)) | ||
|
||
<a id="nestedatt--members"></a> | ||
### Nested Schema for `members` | ||
|
||
Read-Only: | ||
|
||
- `user_id` (String) ID of the user who is a member of the Workspace. | ||
- `workspace_id` (String) ID of the Workspace to which the member belongs. | ||
- `workspace_role` (String) Role of the new Workspace Member. Must be one of `workspace_user`, `workspace_developer`, or `workspace_admin`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "anthropic_workspace_member Resource - terraform-provider-anthropic" | ||
subcategory: "" | ||
description: |- | ||
Workspace member resource. | ||
--- | ||
|
||
# anthropic_workspace_member (Resource) | ||
|
||
Workspace member resource. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "anthropic_workspace" "example" { | ||
name = "Workspace Name" | ||
} | ||
data "anthropic_user" "example" { | ||
id = "user_xxxxx" | ||
} | ||
# Create a workspace member | ||
resource "anthropic_workspace_member" "example" { | ||
workspace_id = anthropic_workspace.example.id | ||
user_id = data.anthropic_user.example.id | ||
workspace_role = "workspace_developer" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `user_id` (String) ID of the user who is a member of the Workspace. | ||
- `workspace_id` (String) ID of the Workspace to which the member belongs. | ||
- `workspace_role` (String) Role of the new Workspace Member. Must be one of `workspace_user`, `workspace_developer`, or `workspace_admin`. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Import an existing workspace member | ||
terraform import anthropic_workspace_member.example workspace_id/user_id | ||
|
||
# Example | ||
terraform import anthropic_workspace_member.example wrkspc_xxxxx/user_xxxxx | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data "anthropic_user" "example" { | ||
id = "user_xxxxx" | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/data-sources/anthropic_workspace_member/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
data "anthropic_workspace_member" "example" { | ||
workspace_id = "wrkspc_xxxxx" | ||
user_id = "user_xxxxx" | ||
} |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/anthropic_workspace_members/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data "anthropic_workspace_members" "example" { | ||
id = "wrkspc_xxxxx" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Import an existing workspace member | ||
terraform import anthropic_workspace_member.example workspace_id/user_id | ||
|
||
# Example | ||
terraform import anthropic_workspace_member.example wrkspc_xxxxx/user_xxxxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "anthropic_workspace" "example" { | ||
name = "Workspace Name" | ||
} | ||
|
||
data "anthropic_user" "example" { | ||
id = "user_xxxxx" | ||
} | ||
|
||
# Create a workspace member | ||
resource "anthropic_workspace_member" "example" { | ||
workspace_id = anthropic_workspace.example.id | ||
user_id = data.anthropic_user.example.id | ||
workspace_role = "workspace_developer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.