Skip to content

Commit 1316a54

Browse files
committed
Stack updates
1 parent 0561bef commit 1316a54

File tree

4 files changed

+65
-63
lines changed

4 files changed

+65
-63
lines changed

content/terraform-docs-agents/v1.24.x/docs/cloud-docs/agents/agent-pools.mdx

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
---
22
page_title: Manage HCP Terraform agent pools
33
description: >-
4-
Agent pools are groups of one or more agents. Learn how to manage agent pools and assign them to specific workspaces.
4+
Agent pools are groups of one or more agents. Learn how to manage agent pools and assign them to specific workspaces or Stacks.
55
---
66

77
# Manage agent pools
88

9-
HCP Terraform organizes agents into agent pools. An agent pool represents a group of agents that lets HCP Terraform communicate with isolated, private, or on-premises infrastructure. When you configure a workspace to execute runs using agents, any available agent in that workspace's associated agent pool can complete the run.
9+
HCP Terraform organizes agents into agent pools. An agent pool represents a group of agents that lets HCP Terraform communicate with isolated, private, or on-premises infrastructure. When you configure a workspace or Stack to execute runs using agents, any available agent in that workspace or Stack's associated agent pool can complete the run.
10+
11+
<Note>
12+
13+
Terraform Enterprise does not support Stacks. You can only scope agent pools to workspaces and projects in Terraform Enterprise.
14+
15+
</Note>
1016

1117
## Permissions
1218

1319
Managing agent pools requires the following permissions:
1420

15-
- You must be a member of the **Owners** team within your organization to manage an organization's agents.
16-
- You must have **Admin** access to a workspace before you can change its [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode) to use an agent pool.
21+
- You must have the [**Manage Agent Pools**](/terraform/cloud-docs/users-teams-organizations/permissions/organization#manage-agent-pools) permission in your organization to manage an organization's agents.
22+
- You must have **Admin** access to a workspace or Stack before you can change its execution mode to use an agent pool.
1723

1824
Refer to [Permissions](/terraform/cloud-docs/users-teams-organizations/permissions) in the HCP Terraform documentation for details.
1925

@@ -25,7 +31,7 @@ To create an agent pool:
2531

2632
1. Go to your organization's settings, click **Agents**, and then click **Create agent pool**.
2733

28-
1. Enter an **Agent Pool Name**, and then click **Continue**. HCP Terraform uses this name to distinguish agent pools in a workspace's settings.
34+
1. Enter an **Agent Pool Name**, and then click **Continue**. HCP Terraform uses this name to distinguish agent pools in a workspace or Stack's settings.
2935

3036
1. Enter a token **Description**, and then click **Create Token**.
3137

@@ -36,26 +42,25 @@ To create an agent pool:
3642
To connect an agent to this pool, configure and [start an agent using the official Docker image](/terraform/cloud-docs/agents/agents#quick-start).
3743
Alternatively, configure and [start an agent using the binary](/terraform/cloud-docs/agents/agents#start-an-agent) then provide then agent with your agent pool's token.
3844

39-
## Scope an agent pool to specific workspaces
45+
## Scope an agent pool
4046

41-
Scoping an agent pool lets you specify which workspaces can use it. The agent pool is only available from within the chosen workspaces, and it does not appear other workspace's lists of available agent pools.
47+
Scoping an agent pool lets you specify which workspaces, projects, or Stacks can use it. The agent pool is only available from within the chosen workspaces, projects, or Stacks, and it does not appear in other workspace's, project's, or Stack's lists of available agent pools.
4248

43-
~> **Important:** Scoping an agent pool does not remove it from workspaces that are actively using it. To remove access, you must first remove the agent pool from within the workspace's settings.
49+
~> **Important:** Scoping an agent pool does not remove it from workspaces, projects, or Stacks that are actively using it. To remove access, you must first remove the agent pool from within the workspace, project, or Stack settings.
4450

45-
To scope an agent pool to specific workspaces within the organization:
51+
To scope an agent pool to specific workspaces, projects, or Stacks within the organization:
4652

4753
1. Go to your organization's settings, and then click **Agents**. The **Agents** page appears, with a list of agent pools for the organization.
4854

4955
1. Click the name of the pool you want to update.
5056

51-
1. Click **Grant access to specific workspaces**. A menu opens where you can search for workspaces within this organization.
57+
1. Click **Grant access to specific projects, workspaces, and Stacks**. A menu opens where you can search for workspaces, projects, and Stacks within this organization.
5258

53-
1. Type in the search field to find available workspaces and select the workspaces that should have access to the agent pool.
59+
1. Type in the search field to find available workspaces, projects, and Stacks and select the workspaces, projects, and Stacks that should have access to the agent pool.
5460

5561
1. Click **Save**.
5662

57-
Only the specified workspaces can use the agent pool.
58-
63+
Only the specified workspaces, projects, and Stacks can use the agent pool.
5964

6065
## Configure workspaces to use the agent
6166

@@ -79,61 +84,55 @@ To configure the workspace to execute runs using an agent:
7984

8085
The workspace begins using the agent for Terraform runs. Runs involving an agent include information about that agent in the run details. HCP Terraform may use different agents for the plan and apply operations, depending on agent availability within the pool.
8186

82-
## Exclude workspaces from accessing an agent pool
87+
## Configure Stacks to use the agent
8388

84-
Excluding workspaces from an agent pool prevents the specified workspaces from using it.
89+
Use the following steps to configure a Stack to use an agent pool.
8590

86-
To exclude a workspace from an agent pool:
91+
### Step 1: Manage existing runs
8792

88-
1. Go to your organization's settings, and then click **Agents**. The **Agents** page appears, with a list of agent pools for the organization.
93+
Changing a Stack's [execution mode](/terraform/cloud-docs/stacks/configure#change-execution-mode) after Terraform completes a plan causes that run to error during apply. To minimize these errors, wait for all in-progress deployment runs to complete before you change the execution mode.
8994

90-
1. Click the name of the pool you want to update.
95+
### Step 2: Select agent pool
9196

92-
1. Click **Grant access to specific projects and workspaces**.
97+
To learn how to configure a Stack to execute runs using an agent, refer to [Configure a Stack](/terraform/cloud-docs/stacks/configure#configure-a-stack-1).
9398

94-
1. Click **Add exclusions**. A menu opens where you can search for workspaces within this organization.
99+
After changing the execution mode, your Stack begins using the agent for deployment runs. Runs involving an agent include information about that agent in the run details. HCP Terraform may use different agents for the plan and apply runs, depending on agent availability within the pool.
95100

96-
1. Type in the search field to find available workspaces and select the workspaces that should be restricted from accessing the agent pool.
101+
## Configure projects to use the agent
97102

98-
1. Click **Save**.
103+
To configure the project to execute runs using an agent:
99104

100-
Only the specified workspaces will be restricted from accessing the agent pool.
105+
1. Go to the project's **General Settings** page.
106+
1. Select **Agent** as the [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode), and select the agent pool this project should use.
107+
1. Click **Save Settings**.
101108

102-
## Scope an agent pool to specific projects
109+
The project begins using the agent for Terraform runs. Any workspace within the project will inherit the execution mode, which will be passed onto the run. Runs involving an agent include information about that agent in the run details. HCP Terraform may use different agents for the plan and apply operations, depending on agent availability within the pool.
103110

104-
You can scope an agent pool to specific projects. Only the selected projects are able to use the agent pool.
111+
## Exclude workspaces and Stacks from accessing an agent pool
105112

106-
~> **Important:** Scoping an agent pool does not remove it from projects that already use it. To remove access, you must first remove the agent pool from the project's settings.
113+
Excluding workspaces and Stacks from an agent pool prevents the specified workspaces and Stacks from using it.
107114

108-
To scope an agent pool to specific projects within the organization:
115+
To exclude a workspace or Stack from an agent pool:
109116

110117
1. Go to your organization's settings, and then click **Agents**. The **Agents** page appears, with a list of agent pools for the organization.
111118

112119
1. Click the name of the pool you want to update.
113120

114-
1. Click **Grant access to specific projects and workspaces**. A menu opens where you can search for projects within this organization.
115-
116-
1. Type in the search field to find available projects and select the projects that should have access to the agent pool.
117-
118-
1. Click **Save**.
119-
120-
Only the specified projects can use the agent pool.
121+
1. Click **Grant access to specific projects and workspaces**.
121122

122-
## Configure projects to use the agent
123+
1. Click **Add exclusions**. A menu opens where you can search for workspaces and Stacks within this organization.
123124

124-
To configure the project to execute runs using an agent:
125+
1. Type in the search field to find available workspaces and Stacks and select the workspaces and Stacks that should be restricted from accessing the agent pool.
125126

126-
1. Go to the project's **General Settings** page.
127-
1. Select **Agent** as the [execution mode](/terraform/cloud-docs/workspaces/settings#execution-mode), and select the agent pool this project should use.
128-
1. Click **Save Settings**.
127+
1. Click **Save**.
129128

130-
The project begins using the agent for Terraform runs. Any workspace within the project will inherit the execution mode, which will be passed onto the run. Runs involving an agent include information about that agent in the run details. HCP Terraform may use different agents for the plan and apply operations, depending on agent availability within the pool.
129+
Only the specified workspaces and Stacks are restricted from accessing the agent pool.
131130

132131
## Revoke an agent token
133132

134133
You may revoke an issued token from your agents at any time.
135134

136-
Revoking a token causes the agents using it to exit. You must reinitialize agents with a new token before they can continue servicing workspace jobs.
135+
Revoking a token causes the agents using it to exit. You must reinitialize agents with a new token before they can continue servicing runs.
137136

138137
Allow active runs in the associated agent pool to finish before revoking a token. If you de-authorize an agent while it is still performing a run, the agent does not post updates about that run. We recommend generating a new token first, initializing the agents using it, and then revoking the old token once no agents are using it. Agent tokens display information about the last time an agent used them. You can use this information to help you decide whether a token is safe to revoke.
139138

@@ -145,12 +144,12 @@ Allow active runs in the associated agent pool to finish before revoking a token
145144

146145
## Delete an agent pool
147146

148-
~> **Important:** You cannot delete an agent pool that is still associated with one or more workspaces.
147+
~> **Important:** You cannot delete an agent pool that is still associated with one or more workspaces or Stacks.
149148

150149
To delete an agent pool:
151150

152-
1. Wait for all associated workspaces to complete all in progress runs.
153-
1. Remove the agent pool from all associated workspaces.
151+
1. Wait for all associated workspaces and Stacks to complete all in progress runs.
152+
1. Remove the agent pool from all associated workspaces and Stacks.
154153
1. Navigate to your organization's settings, click **Agents**, and then click the name of the agent pool you want to delete.
155154
1. Click **Delete agent pool**.
156155
1. Click **Yes, delete agent pool** to confirm.

content/terraform-docs-agents/v1.24.x/docs/cloud-docs/agents/agents.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ RUN echo 'tfc-agent ALL=NOPASSWD: /usr/bin/apt-get , /usr/bin/apt' >> /etc/sudoe
9797

9898
USER tfc-agent
9999
```
100-
100+
101101
The above customized Dockerfile lets an agent install additional software using `sudo apt-get`.
102102

103103
### Single-execution mode
@@ -130,15 +130,15 @@ If a provider does not support your agent’s architecture, the following error
130130
```plaintext
131131
Error: Incompatible provider version
132132
133-
Provider registry.terraform.io/<namespace>/<name_version> does not have a
133+
Provider registry.terraform.io/<namespace>/<name_version> does not have a
134134
package available for your current platform, <os_architecture>.
135135
136-
Provider releases are separate from Terraform CLI releases, so not all
137-
providers are available for all platforms. Other versions of this provider
136+
Provider releases are separate from Terraform CLI releases, so not all
137+
providers are available for all platforms. Other versions of this provider
138138
may have different platforms supported.
139139
```
140140

141-
You can call the [Terraform provider registry API](/terraform/internals/provider-registry-protocol#list-available-versions) to confirm the architectures available for a provider.
141+
You can call the [Terraform provider registry API](/terraform/internals/provider-registry-protocol#list-available-versions) to confirm the architectures available for a provider.
142142

143143
Sample request:
144144

@@ -177,7 +177,7 @@ Sample response:
177177

178178
<!--
179179
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
180-
WARNING: This the CLI options section is auto-generated during agent release process.
180+
WARNING: This the CLI options section is auto-generated during agent release process.
181181
Do not edit this section directly as your changes will be overwritten.
182182
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
183183
-->
@@ -308,7 +308,7 @@ Sample response:
308308

309309

310310
* `-request-forwarding`:
311-
Enable handling of forwarded HTTP requests. Enable this option only if you
311+
Enable handling of forwarded HTTP requests. Enable this option only if you
312312
are using product features which require it.
313313

314314
Default: `false`
@@ -331,4 +331,3 @@ Sample response:
331331

332332
* `-v`:
333333
Display the version and exit.
334-

content/terraform-docs-agents/v1.24.x/docs/cloud-docs/agents/hooks.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ functionality of Terraform runs. For example, you may create a hook to
1212
dynamically download software required by the Terraform run or send an HTTP
1313
request to a system to kick off an external workflow.
1414

15+
<Note>
16+
Agent hooks do not support Stack workflows in HCP Terraform.
17+
</Note>
18+
1519
## Supported Hooks
1620

1721
HCP Terraform Agents support the following hooks:
@@ -26,7 +30,7 @@ HCP Terraform Agents support the following hooks:
2630
- `post-apply` - Runs after `terraform apply` during an `apply` operation
2731
regardless of whether or not `terraform apply` completed successfully.
2832

29-
## Hook Behavior
33+
## Hook Behavior
3034

3135
Please note the following behavior when using hooks:
3236

@@ -41,13 +45,13 @@ Please note the following behavior when using hooks:
4145
create a `pre-plan` and `pre-apply` hook, but you cannot create two
4246
`pre-plan` hooks.
4347
- Each hook must have the execute permission set.
44-
- Each hook has a default timeout of 60 seconds and a max timeout of 10 minutes.
45-
You can configure hook timeouts using global timeouts or hook-specific timeouts.
46-
You can set the value of any hook timeout in seconds. If a hook times out, the Terraform
48+
- Each hook has a default timeout of 60 seconds and a max timeout of 10 minutes.
49+
You can configure hook timeouts using global timeouts or hook-specific timeouts.
50+
You can set the value of any hook timeout in seconds. If a hook times out, the Terraform
4751
run fails immediately.
4852
- To set global timeouts, use the `TFC_AGENT_HOOK_TIMEOUT` environment variable.
49-
- To set hook-specific timeouts, use an environment variable with the hook’s name
50-
`TFC_AGENT_HOOK_[HOOK NAME]_TIMEOUT`. For example, you can set the timeout for the
53+
- To set hook-specific timeouts, use an environment variable with the hook’s name
54+
`TFC_AGENT_HOOK_[HOOK NAME]_TIMEOUT`. For example, you can set the timeout for the
5155
pre-plan hook to 2 minutes by setting `TFC_AGENT_HOOK_PRE_PLAN_TIMEOUT=120`.
5256
A hook-specific timeout takes precedence over the global hook timeout.
5357
- Terraform environment variables do not persist across hooks. For example, if a
@@ -136,7 +140,7 @@ user interface.
136140
Initializing plugins and modules...
137141
```
138142
139-
### Running an Agent with Docker
143+
### Running an Agent with Docker
140144
141145
When running `tfc-agent` using Docker, you must build a new Docker image
142146
containing the hooks. To configure hooks:

content/terraform-docs-agents/v1.24.x/docs/cloud-docs/agents/requirements.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ You can use the agent with the following versions of Terraform.
2828
Workspaces configured to use Terraform versions older than 0.12 cannot select the agent-based execution mode.
2929

3030

31-
## Hardware
31+
## Hardware
3232

33-
The host running the agent has varying resource requirements depending on the workspaces the agent serves and the agent's configuration. A host can be a dedicated or shared cloud instance, virtual machine, bare metal server, or a container. You should monitor and adjust memory, CPU, and disk space based on each workspace's usage and performance.
33+
The host running the agent has varying resource requirements depending on the workspaces and Stacks the agent serves, and the agent's configuration. A host can be a dedicated or shared cloud instance, virtual machine, bare metal server, or a container. You should monitor and adjust memory, CPU, and disk space based on each workspace and Stack's usage and performance.
3434

3535
All agents in an agent pool should have the same hardware resources available. If the agents use different resources, run performance can vary significantly between each agent in the pool.
3636

@@ -68,7 +68,7 @@ Terraform's `local-exec` provisioners, an `external` data source, or a tfc-agent
6868
* `tar` - Unarchiver for tar archives.
6969
* `gzip` - Decompression utility for gzipped archives.
7070

71-
## Networking
71+
## Networking
7272

7373
In order for an agent to function properly, it must be able to make outbound TCP connections to the HCP Terraform application APIs. These requests may require perimeter networking as well as container host networking changes, depending on your environment. Refer to the [HCP Terraform IP Ranges documentation](/terraform/cloud-docs/architectural-details/ip-ranges) for more details on the IP ranges.
7474

@@ -80,4 +80,4 @@ Additionally, the agent must also be able to communicate with any services requi
8080
| registry.terraform.io | tcp/443, HTTPS | Outbound | Downloading public modules from the Terraform Registry |
8181
| releases.hashicorp.com | tcp/443, HTTPS | Outbound | Updating agent components and downloading Terraform binaries |
8282
| archivist.terraform.io | tcp/443, HTTPS | Outbound | Blob Storage |
83-
| agents.terraform.io | tcp/7146, TCP | Outbound | Agent RPC interface (currently used for request forwarding and hold your own key features) |
83+
| agents.terraform.io | tcp/7146, TCP | Outbound | Agent RPC interface (currently used for request forwarding and hold your own key features) |

0 commit comments

Comments
 (0)