Skip to content

Instantly share code, notes, and snippets.

@pandom
Created June 9, 2021 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pandom/66c497d5a328426a6583f510ab58fc57 to your computer and use it in GitHub Desktop.
Save pandom/66c497d5a328426a6583f510ab58fc57 to your computer and use it in GitHub Desktop.
How to
resource tfe_workspace "this" {
name = var.tfe_workspace_name != "" ? var.tfe_workspace_name : var.repository_name
organization = var.tfe_org_name
auto_apply = var.tfe_auto_apply
# Default is Remote;
execution_mode = var.execution_mode
# Agent override will trigger below - If AGENT use pool ID others it not, null
agent_pool_id = var.execution_mode == "agent" ? var.agent_pool_id : null
//TODO - If we provide agent pool ID then automatically select agent execution mode
vcs_repo {
identifier = var.create_repo == true ? github_repository.this[0].full_name : data.github_repository.this[0].full_name
branch = var.repository_branch
oauth_token_id = var.oauth_token_id
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment