|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "astro_team_roles Resource - astro" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Team Roles resource |
| 7 | +--- |
| 8 | + |
| 9 | +# astro_team_roles (Resource) |
| 10 | + |
| 11 | +Team Roles resource |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "astro_team_roles" "organization_role_only" { |
| 17 | + team_id = "clnp86ly5000401ndaga21g81" |
| 18 | + organization_role = "ORGANIZATION_MEMBER" |
| 19 | +} |
| 20 | +
|
| 21 | +resource "astro_team_roles" "workspace_roles" { |
| 22 | + team_id = "clnp86ly5000401ndaga21g81" |
| 23 | + organization_role = "ORGANIZATION_MEMBER" |
| 24 | + workspace_roles = [ |
| 25 | + { |
| 26 | + workspace_id = "clwp86ly5000401ndaga21g85" |
| 27 | + role = "WORKSPACE_ADMIN" |
| 28 | + }, |
| 29 | + { |
| 30 | + workspace_id = "clwp86ly5000401ndaga21g82" |
| 31 | + role = "WORKSPACE_MEMBER" |
| 32 | + } |
| 33 | + ] |
| 34 | +} |
| 35 | +
|
| 36 | +resource "astro_team_roles" "deployment_roles" { |
| 37 | + team_id = "clnp86ly5000401ndaga21g81" |
| 38 | + organization_role = "ORGANIZATION_MEMBER" |
| 39 | + deployment_roles = [ |
| 40 | + { |
| 41 | + deployment_id = "cldp86ly5000401ndaga21g86" |
| 42 | + role = "DEPLOYMENT_ADMIN" |
| 43 | + } |
| 44 | + ] |
| 45 | +} |
| 46 | +
|
| 47 | +resource "astro_team_roles" "all_roles" { |
| 48 | + team_id = "clnp86ly5000401ndaga21g81" |
| 49 | + organization_role = "ORGANIZATION_MEMBER" |
| 50 | + workspace_roles = [ |
| 51 | + { |
| 52 | + workspace_id = "clwp86ly5000401ndaga21g85" |
| 53 | + role = "WORKSPACE_OWNER" |
| 54 | + }, |
| 55 | + { |
| 56 | + workspace_id = "clwp86ly5000401ndaga21g82" |
| 57 | + role = "WORKSPACE_MEMBER" |
| 58 | + } |
| 59 | + ] |
| 60 | + deployment_roles = [ |
| 61 | + { |
| 62 | + deployment_id = "cldp86ly5000401ndaga21g86" |
| 63 | + role = "my custom role" |
| 64 | + } |
| 65 | + ] |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +<!-- schema generated by tfplugindocs --> |
| 70 | +## Schema |
| 71 | + |
| 72 | +### Required |
| 73 | + |
| 74 | +- `organization_role` (String) The role to assign to the organization |
| 75 | +- `team_id` (String) The ID of the team to assign the roles to |
| 76 | + |
| 77 | +### Optional |
| 78 | + |
| 79 | +- `deployment_roles` (Attributes Set) The roles to assign to the deployments (see [below for nested schema](#nestedatt--deployment_roles)) |
| 80 | +- `workspace_roles` (Attributes Set) The roles to assign to the workspaces (see [below for nested schema](#nestedatt--workspace_roles)) |
| 81 | + |
| 82 | +<a id="nestedatt--deployment_roles"></a> |
| 83 | +### Nested Schema for `deployment_roles` |
| 84 | + |
| 85 | +Required: |
| 86 | + |
| 87 | +- `deployment_id` (String) The ID of the deployment to assign the role to |
| 88 | +- `role` (String) The role to assign to the deployment |
| 89 | + |
| 90 | + |
| 91 | +<a id="nestedatt--workspace_roles"></a> |
| 92 | +### Nested Schema for `workspace_roles` |
| 93 | + |
| 94 | +Required: |
| 95 | + |
| 96 | +- `role` (String) The role to assign to the workspace |
| 97 | +- `workspace_id` (String) The ID of the workspace to assign the role to |
0 commit comments