tfe_organization_default_settings

Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a tfe_workspace_settings resource (or deprecated attributes on the workspace resource).

Example Usage

Basic usage:

resource "tfe_organization" "test" {
  name  = "my-org-name"
  email = "admin@company.com"
}

resource "tfe_agent_pool" "my_agents" {
  name         = "agent_smiths"
  organization = tfe_organization.test.name
}

resource "tfe_organization_default_settings" "org_default" {
  organization           = tfe_organization.test.name
  default_execution_mode = "agent"
  default_agent_pool_id  = tfe_agent_pool.my_agents.id
}

resource "tfe_workspace" "my_workspace" {
  name       = "my-workspace"
  # This workspace will use the org defaults, and will report those defaults as
  # the values of its corresponding attributes. Use depends_on to get accurate
  # values immediately, and to ensure reliable behavior of tfe_workspace_run.
  depends_on = [tfe_organization_default_settings.org_default]
}

Argument Reference

The following arguments are supported:

Import

Organization default execution mode can be imported; use <ORGANIZATION NAME> as the import ID. For example:

terraform import tfe_organization_default_settings.test my-org-name