Code which manages configuration and life-cycle of the HCP Waypoint Repositories 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
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) Name of the module.
Type: string
Default: "repositoriesfactory"
Description: (Optional) Name of the module provider.
Type: string
Default: "github"
Description: (Optional) Name of the Terraform Cloud/Enterprise project where the workspace created by the no-code is located.
Type: string
Default: "GitHub Repositories 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 GitHub repository. You must provide an application name (unique, up to 50 characters, letters/numbers/dashes/underscores, ends with -repository), repository name, description, and topics (comma-separated without spaces)."
Description: (Optional) Labels to assign to the Waypoint template.
Type: list(string)
Default:
[
"github",
"repository"
]Description: (Optional) Name of the Waypoint template.
Type: string
Default: "GitHubRepository"
Description: (Optional) A brief description of the Waypoint template, up to 64 characters.
Type: string
Default: "This template is use to provision a GitHub repository."
Description: (Optional) The template_variables 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": "description",
"variable_type": "string"
},
{
"name": "topics",
"variable_type": "string"
}
]The following resources are used by this module:
- hcp_waypoint_template.this (resource)
- tfe_project.this (data source)
- tfe_registry_module.this (data source)
No outputs.