You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+68-2
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,88 @@
3
3
page_title: "coderd Provider"
4
4
subcategory: ""
5
5
description: |-
6
+
The coderd provider can be used to manage resources on a Coder deployment. The provider exposes resources and data sources for users, groups, templates, and workspace proxies.
6
7
~> Warning
7
8
This provider is only compatible with Coder version 2.10.1 https://github.com/coder/coder/releases/tag/v2.10.1 and later.
8
9
---
9
10
10
11
# coderd Provider
11
12
13
+
The coderd provider can be used to manage resources on a Coder deployment. The provider exposes resources and data sources for users, groups, templates, and workspace proxies.
14
+
12
15
~> **Warning**
13
16
This provider is only compatible with Coder version [2.10.1](https://github.com/coder/coder/releases/tag/v2.10.1) and later.
14
17
18
+
## Example Usage
19
+
20
+
```terraform
21
+
terraform {
22
+
required_providers {
23
+
coderd = {
24
+
source = "coder/coderd"
25
+
}
26
+
}
27
+
}
28
+
29
+
provider "coderd" {
30
+
# `token` and `url` can be populated from environment variables.
31
+
# `default_organization_id` can be populated using
32
+
# the first organization the session token has access to.
# Version names can be randomly generated if null/omitted
67
+
}]
68
+
acl = {
69
+
groups = [{
70
+
id = data.coderd_organization.default.id
71
+
role = "use"
72
+
},
73
+
{
74
+
id = resource.coderd_group.bosses.id
75
+
role = "admin"
76
+
}]
77
+
users = []
78
+
}
79
+
allow_user_cancel_workspace_jobs = false
80
+
}
81
+
```
16
82
17
83
<!-- schema generated by tfplugindocs -->
18
84
## Schema
19
85
20
86
### Optional
21
87
22
88
-`default_organization_id` (String) Default organization ID to use when creating resources. Defaults to the first organization the token has access to.
23
-
-`token` (String) API token for communicating with the deployment. Most resource types require elevated permissions. Defaults to $CODER_SESSION_TOKEN.
24
-
-`url` (String) URL to the Coder deployment. Defaults to $CODER_URL.
89
+
-`token` (String) API token for communicating with the deployment. Most resource types require elevated permissions. Defaults to `$CODER_SESSION_TOKEN`.
90
+
-`url` (String) URL to the Coder deployment. Defaults to `$CODER_URL`.
A group on the Coder deployment. If you want to have a group resource with unmanaged members, but still want to read the members in Terraform, use the data.coderd_group data source. Creating groups requires an Enterprise license.
6
+
A group on the Coder deployment.
7
+
To have a group resource with unmanaged members, but be able to read the members in Terraform, use the data.coderd_group data source. Creating groups requires an Enterprise license.
7
8
---
8
9
9
10
# coderd_group (Resource)
10
11
11
-
A group on the Coder deployment. If you want to have a group resource with unmanaged members, but still want to read the members in Terraform, use the `data.coderd_group` data source. Creating groups requires an Enterprise license.
12
+
A group on the Coder deployment.
13
+
14
+
To have a group resource with unmanaged members, but be able to read the members in Terraform, use the `data.coderd_group` data source. Creating groups requires an Enterprise license.
-`acl` (Attributes) (Enterprise) Access control list for the template. If null, ACL policies will not be addedor removed by Terraform. (see [below for nested schema](#nestedatt--acl))
58
+
-`acl` (Attributes) (Enterprise) Access control list for the template. If null, ACL policies will not be added, removed, or inspected by Terraform. (see [below for nested schema](#nestedatt--acl))
59
59
-`activity_bump_ms` (Number) The activity bump duration for all workspaces created from this template, in milliseconds. Defaults to one hour.
60
60
-`allow_user_auto_start` (Boolean) (Enterprise) Whether users can auto-start workspaces created from this template. Defaults to true.
61
61
-`allow_user_auto_stop` (Boolean) (Enterprise) Whether users can auto-start workspaces created from this template. Defaults to true.
62
62
-`allow_user_cancel_workspace_jobs` (Boolean) Whether users can cancel in-progress workspace jobs using this template. Defaults to true.
63
63
-`auto_start_permitted_days_of_week` (Set of String) (Enterprise) List of days of the week in which autostart is allowed to happen, for all workspaces created from this template. Defaults to all days. If no days are specified, autostart is not allowed.
64
64
-`auto_stop_requirement` (Attributes) (Enterprise) The auto-stop requirement for all workspaces created from this template. (see [below for nested schema](#nestedatt--auto_stop_requirement))
65
65
-`default_ttl_ms` (Number) The default time-to-live for all workspaces created from this template, in milliseconds.
66
-
-`deprecation_message` (String) If set, the template will be marked as deprecated and users will be blocked from creating new workspaces from it.
66
+
-`deprecation_message` (String) If set, the template will be marked as deprecated and users will be blocked from creating new workspaces from it. The provided message will be displayed.
67
67
-`description` (String) A description of the template.
68
68
-`display_name` (String) The display name of the template. Defaults to the template name.
69
69
-`failure_ttl_ms` (Number) (Enterprise) The max lifetime before Coder stops all resources for failed workspaces created from this template, in milliseconds.
70
70
-`icon` (String) Relative path or external URL that specifes an icon to be displayed in the dashboard.
71
71
-`organization_id` (String) The ID of the organization. Defaults to the provider's default organization
72
72
-`require_active_version` (Boolean) (Enterprise) Whether workspaces must be created from the active version of this template. Defaults to false.
73
73
-`time_til_dormant_autodelete_ms` (Number) (Enterprise) The max lifetime before Coder permanently deletes dormant workspaces created from this template.
74
-
-`time_til_dormant_ms` (Number) Enterprise) The max lifetime before Coder locks inactive workspaces created from this template, in milliseconds.
74
+
-`time_til_dormant_ms` (Number) (Enterprise) The max lifetime before Coder locks inactive workspaces created from this template, in milliseconds.
0 commit comments