This terraform module creates TFC/E workspaces with Vault integration. Vault shall manage the team token dedicated for running this workspace.
It is intended to be used by a CICD pipeline outside of VCS Integration.
Usage:
module "terraform_workspace" {
source = "git::https://github.com/devops-adeel/terraform-tfc-workspace.git?ref=v0.1.0"
application_name = local.application_name
vault_namespace = local.namespace
username = var.username
vault_address = var.vault_address
organization = var.organization
vault_approle_id = module.vault_approle.approle_id
vault_approle_secret = module.vault_approle.approle_secret
backend_path = module.tfc_secrets.backend_path
}
Vault is required as well as having setup Vault TFC Secrets Engine, see here
Name | Version |
---|---|
tfe | n/a |
vault | n/a |
No modules.
Name | Type |
---|---|
tfe_team.default | resource |
tfe_team_access.default | resource |
tfe_team_member.default | resource |
tfe_variable.approle_id | resource |
tfe_variable.approle_secret | resource |
tfe_variable.vault_addr | resource |
tfe_variable.vault_address | resource |
tfe_variable.vault_namespace | resource |
tfe_variable.vault_token_name | resource |
tfe_workspace.default | resource |
vault_terraform_cloud_secret_role.default | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
application_name | Name of the application/customer | string |
n/a | yes |
backend_path | The secret backend mount Vault TFC secrets engine. | string |
n/a | yes |
organization | TFC Organisation. | string |
n/a | yes |
username | TFC username | string |
n/a | yes |
vault_address | Vault Address URL | string |
n/a | yes |
vault_approle_id | Vault Approle ID | string |
n/a | yes |
vault_approle_secret | Vault Approle Secret ID | string |
n/a | yes |
vault_namespace | Vault namespace to add as TFC variable | string |
n/a | yes |
Name | Description |
---|---|
tfc_secret_role | Vault Secret role name |
tfc_team_id | Terraform Cloud Team ID |
workspace_id | TFC workspace ID |
workspace_name | TFC workspace name |