Created
June 9, 2021 05:02
-
-
Save pandom/66c497d5a328426a6583f510ab58fc57 to your computer and use it in GitHub Desktop.
How to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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