Code which manages configuration and life-cycle of the HCP Waypoint Workspaces Factory. It is designed to be used from a dedicated VCS-Driven Terraform workspace that would provision and manage the configuration using Terraform code (IaC).
To manage resources, provide a user token from an account with appropriate permissions.
This user should have the Manage Projects and Manage Workspaces permission. Alternatively,
you can use a token from a team instead of a user token.
To manage the resources from that code, provide a Client ID and a Client Secret from a service principal key with admin permissions.
The HCP Terraform provider requires a HCP Terraform/Terraform Enterprise API token in order to manage resources.
There are several ways to provide the required token:
- Set the
tokenargument in the provider configuration. You can set the token argument in the provider configuration. Use an input variable for the token. - Set the
TFE_TOKENenvironment variable. The provider can read the TFE_TOKEN environment variable and the token stored there to authenticate.
The HCP provider requires a Client ID and a Client Secret from a service principal key in order to manage resources.
There are several ways to provide the required informations:
- Set the
client_idandclient_secretargument in the provider configuration. Use input variables. - Set the
HCP_CLIENT_IDandHCP_CLIENT_SECRETenvironment variables.
- HCP Waypoint Template
- HCP Waypoint Add-on
The following requirements are needed by this module:
No modules.
The following input variables are required:
Description: (Required) Name of the organization.
Type: string
The following input variables are optional (have default values):
Description: (Optional) A description of the Waypoint add-on, along with when and why it should be used, up to 500 characters.
Type: string
Default: "This HCP Waypoint add-on provisions a HCP Terraform workspace. You must provide an application name (unique, up to 50 characters, letters/numbers/dashes/underscores, ends with -workspace), workspace name, project name, and a vcs repository identifier."
Description: (Optional) A brief description of the Waypoint add-on, up to 64 characters.
Type: string
Default: "This add-on provisions a HCP Terraform workspace."
Description: (Optional) Labels to assign to the Waypoint template and add-on.
Type: list(string)
Default:
[
"hcp terraform",
"workspace"
]Description: (Optional) Name of the module.
Type: string
Default: "workspacesfactory"
Description: (Optional) Name of the module provider.
Type: string
Default: "tfe"
Description: (Optional) Name of the Waypoint template and add-on.
Type: string
Default: "HCPTerraformWorkspace"
Description: (Optional) Name of the Terraform Cloud/Enterprise project where the workspace created by the no-code is located.
Type: string
Default: "Terraform Workspaces Factory"
Description: (Optional) A description of the Waypoint template, along with when and why it should be used, up to 500 characters.
Type: string
Default: "This HCP Waypoint template provisions a HCP Terraform workspace. You must provide an application name (unique, up to 50 characters, letters/numbers/dashes/underscores, ends with -workspace), workspace name, project name, and a vcs repository identifier."
Description: (Optional) A brief description of the Waypoint template, up to 64 characters.
Type: string
Default: "This template is use to provision a HCP Terraform workspace."
Description: (Optional) The variables block is a list of object that supports the following:
name : (Required) The name of the variable.
variable_type : (Required) The type of the variable.
options : (Optional) A list of options for the variable, if applicable.
user_editable : (Optional) Whether the variable is editable by the user creating an application.
Type:
list(object({
name = string
variable_type = string
options = optional(list(string), null)
user_editable = optional(bool, true)
}))Default:
[
{
"name": "name",
"variable_type": "string"
},
{
"name": "project_name",
"variable_type": "string"
},
{
"name": "vcs_repo_identifier",
"variable_type": "string"
}
]The following resources are used by this module:
- hcp_waypoint_add_on_definition.this (resource)
- hcp_waypoint_template.this (resource)
- tfe_project.this (data source)
- tfe_registry_module.this (data source)
No outputs.