This module has two modes; one which provision VCS backed workspaces and repos in GH, and another which does not provision repos and configures workspaces for CLI/API workflows. At the very least the workspace using this module needs an environment variable set called TFE_TOKEN which is a valid user token with all required permissions for the target organization. If you are using the VCS workflow mode, this workspace will also need a GITHUB_TOKEN environment variable set.
- 'TFE_TOKEN' environment variable on the workspace
- 'GITHUB_TOKEN' environment variable on the workspace
- A pre-configured OAuth Client connection between GH and TFC/E
module "workspace-vending" {
# source = "app.terraform.io/djs-tfcb/workspace-vending/tfe"
# version = "4.0.0"
source = "github.com/djschnei21/terraform-tfe-workspace-vending"
tf_org = "djs-tfcb"
gh_org = "djschnei21"
oauth_client_name = "github-test"
vcs = true
app_ids = [
"100",
"200"
]
app_envs = [ "development", "uat", "production" ]
}
- 'TFE_TOKEN' environment variable on the workspace
module "workspace-vending" {
# source = "app.terraform.io/djs-tfcb/workspace-vending/tfe"
# version = "4.0.0"
source = "github.com/djschnei21/terraform-tfe-workspace-vending"
tf_org = "djs-tfcb"
vcs = false
app_ids = [
"100",
"200"
]
app_envs = [ "development", "uat", "production" ]
}
All providers determined by sub-modules
Name | Source | Version |
---|---|---|
repos | ./modules/repo | n/a |
workspaces-api | ./modules/workspace-api-cli | n/a |
workspaces-vcs | ./modules/workspace-vcs | n/a |
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
app_envs | A list of strings dictating the environment specific branches that will be created | set(string) |
[ |
no |
app_ids | A list of strings dictating the App names which will have workspaces created | set(string) |
[ |
no |
gh_org | The name of the GH org where your repos will be created and your OAuth client is configured. You don't need to pass with if 'vcs = false' | string |
"" |
no |
oauth_client_name | The name of the VCS Provider OAuth Client which is configured in TFC. You don't need to pass with if 'vcs = false' | string |
"" |
no |
projects | Determines whether or not projects are utilized in TFC (BETA Feature - not yet available on TFE) | bool |
false |
no |
tf_org | The name of the TFC organization you want to create workspaces within (TFE_TOKEN must be valid for this org) | string |
n/a | yes |
vcs | Determines whether or not repos will be created and the workspaces connected | bool |
true |
no |
No outputs.