Skip to content

Commit 69841c2

Browse files
committed
Update docs
1 parent 95a6bd7 commit 69841c2

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

website/docs/d/agent_pool.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ The following arguments are supported:
3030
In addition to all arguments above, the following attributes are exported:
3131

3232
* `id` - The agent pool ID.
33+
* `allowed_project_ids` - The set of project IDs that have permission to use the agent pool.
34+
* `allowed_workspace_ids` - The set of workspace IDs that have permission to use the agent pool.
35+
* `excluded_workspace_ids` - The set of workspace IDs that are excluded from the scope of the agent pool.
3336
* `organization_scoped` - Whether or not the agent pool can be used by all workspaces in the organization.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_agent_pool_allowed_projects"
4+
description: |-
5+
Manages allowed projects on agent pools
6+
---
7+
8+
# tfe_agent_pool_allowed_projects
9+
10+
Adds and removes allowed projects on an agent pool.
11+
12+
~> **NOTE:** This resource requires using the provider with HCP Terraform and a HCP Terraform
13+
for Business account.
14+
[Learn more about HCP Terraform pricing here](https://www.hashicorp.com/products/terraform/pricing).
15+
16+
## Example Usage
17+
18+
```hcl
19+
resource "tfe_organization" "test-organization" {
20+
name = "my-org-name"
21+
22+
}
23+
24+
// Ensure project and agent pool are create first
25+
resource "tfe_project" "test-project" {
26+
name = "my-project-name"
27+
organization = tfe_organization.test-organization.name
28+
}
29+
30+
resource "tfe_agent_pool" "test-agent-pool" {
31+
name = "my-agent-pool-name"
32+
organization = tfe_organization.test-organization.name
33+
organization_scoped = false
34+
}
35+
36+
// Ensure permissions are assigned second
37+
resource "tfe_agent_pool_allowed_projects" "allowed" {
38+
agent_pool_id = tfe_agent_pool.test-agent-pool.id
39+
allowed_project_ids = [tfe_project.test-project.id]
40+
}
41+
```
42+
43+
## Argument Reference
44+
45+
The following arguments are supported:
46+
47+
* `agent_pool_id` - (Required) The ID of the agent pool.
48+
* `allowed_project_ids` - (Required) IDs of projects to be added as allowed projects on the agent pool.
49+
50+
51+
## Import
52+
53+
A resource can be imported; use `<AGENT POOL ID>` as the import ID. For example:
54+
55+
```shell
56+
terraform import tfe_agent_pool_allowed_projects.foobar apool-rW0KoLSlnuNb5adB
57+
```
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_agent_pool_excluded_workspaces"
4+
description: |-
5+
Manages excluded workspaces on agent pools
6+
---
7+
8+
# tfe_agent_pool_excluded_workspaces
9+
10+
Adds and removes excluded workspaces on an agent pool.
11+
12+
~> **NOTE:** This resource requires using the provider with HCP Terraform and a HCP Terraform
13+
for Business account.
14+
[Learn more about HCP Terraform pricing here](https://www.hashicorp.com/products/terraform/pricing).
15+
16+
## Example Usage
17+
18+
```hcl
19+
resource "tfe_organization" "test-organization" {
20+
name = "my-org-name"
21+
22+
}
23+
24+
// Ensure workspace and agent pool are create first
25+
resource "tfe_workspace" "test-workspace" {
26+
name = "my-workspace-name"
27+
organization = tfe_organization.test-organization.name
28+
}
29+
30+
resource "tfe_agent_pool" "test-agent-pool" {
31+
name = "my-agent-pool-name"
32+
organization = tfe_organization.test-organization.name
33+
organization_scoped = false
34+
}
35+
36+
// Ensure permissions are assigned second
37+
resource "tfe_agent_pool_excluded_workspaces" "excluded" {
38+
agent_pool_id = tfe_agent_pool.test-agent-pool.id
39+
excluded_workspace_ids = [tfe_workspace.test-workspace.id]
40+
}
41+
```
42+
43+
## Argument Reference
44+
45+
The following arguments are supported:
46+
47+
* `agent_pool_id` - (Required) The ID of the agent pool.
48+
* `excluded_workspace_ids` - (Required) IDs of workspaces to be added as excluded workspaces on the agent pool.
49+
50+
51+
## Import
52+
53+
A resource can be imported; use `<AGENT POOL ID>` as the import ID. For example:
54+
55+
```shell
56+
terraform import tfe_agent_pool_excluded_workspaces.foobar apool-rW0KoLSlnuNb5adB
57+
```

0 commit comments

Comments
 (0)