This module provisions a Terraform Cloud/Enterprise workspace.
Copyright 2019-2025 NephoSolutions srl, Sebastian Trebitz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Name | Version |
---|---|
terraform | >= 1.1.0 |
tfe | >= 0.61.0 |
Name | Version |
---|---|
tfe | 0.62.0 |
No modules.
Name | Type |
---|---|
tfe_run_trigger.upstream_workspace | resource |
tfe_variable.workspace | resource |
tfe_workspace.workspace | resource |
tfe_workspace_settings.workspace | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
agent_pool_id | The ID of an agent pool to assign to the workspace. | string |
null |
no |
allow_destroy_plan | Whether destroy plans can be queued on the workspace. | bool |
false |
no |
auto_apply | Whether to automatically apply changes when a Terraform plan is successful. | bool |
false |
no |
auto_apply_run_trigger | Whether to automatically apply changes for runs that were created by run triggers from another workspace. | bool |
false |
no |
description | A description for the workspace. | string |
n/a | yes |
execution_mode | Which execution mode to use. When set to local , the workspace will be used for state storage only. |
string |
null |
no |
file_triggers_enabled | Whether to filter runs based on the changed files in a VCS push. If enabled, the working directory and trigger prefixes describe a set of paths which must contain changes for a VCS push to trigger a run. If disabled, any push will trigger a run. Workspaces with no Terraform working directory will always trigger runs. | bool |
true |
no |
global_remote_state | Whether the workspace allows all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (remote_state_consumer_ids ). |
bool |
false |
no |
name | Name of the workspace. | string |
n/a | yes |
organization | Name of the Terraform Cloud organization. | string |
null |
no |
project_id | ID of the project where the workspace should be created. | string |
null |
no |
queue_all_runs | Whether the workspace should start automatically performing runs immediately after its creation. | bool |
true |
no |
remote_state_consumer_ids | The set of workspace IDs set as explicit remote state consumers for the given workspace. To set this attribute, global_remote_state must be false. |
list(string) |
[] |
no |
run_trigger_ids | The set of workspace IDs to queue runs automatically on successful apply of runs in any of the source workspaces. | set(string) |
[] |
no |
speculative_enabled | Whether this workspace allows speculative plans. Setting this to false prevents Terraform Cloud or the Terraform Enterprise instance from running plans on pull requests, which can improve security if the VCS repository is public or includes untrusted contributors. |
bool |
true |
no |
ssh_key_id | The ID of an SSH key to assign to the workspace. | string |
null |
no |
structured_run_output_enabled | Whether this workspace should show output from Terraform runs using the enhanced UI when available. Setting this to false ensures that all runs in this workspace will display their output as text logs. |
bool |
true |
no |
tag_names | A list of tag names for this workspace. Note that tags must only contain lowercase letters, numbers, colons, or hyphens. | list(string) |
[] |
no |
terraform_version | The version of Terraform to use for this workspace. This can be either an exact version or a version constraint (like ~> 1.0.0 ); if you specify a constraint, the workspace will always use the newest release that meets that constraint. |
string |
null |
no |
trigger_patterns | List of glob patterns that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. | list(string) |
null |
no |
trigger_prefixes | List of repository-root-relative paths which describe all locations to be tracked for changes. | list(string) |
null |
no |
variables | Set of variables to configure. | set(object({ |
[] |
no |
vcs_repository | Settings for the workspace's VCS repository, enabling the UI/VCS-driven run workflow. Omit this argument to utilize the CLI-driven and API-driven workflows, where runs are not driven by webhooks on your VCS provider. | object({ |
null |
no |
working_directory | A relative path that Terraform will execute within. Defaults to the root of your repository. | string |
null |
no |
Name | Description |
---|---|
id | The workspace identifier. |
name | The workspace name. |
run_triggers_ids | A map run_trigger IDs which link the workspace to the source workspace. |