Skip to content

benoitblais-hashicorp-demo/HCPWaypoint-WorkspacesFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HCP Waypoint Workspaces Factory

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).

Permissions

HCP Terraform Permissions

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.

HCP Permissions

To manage the resources from that code, provide a Client ID and a Client Secret from a service principal key with admin permissions.

Authentication

HCP Terraform Authentication

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 token argument in the provider configuration. You can set the token argument in the provider configuration. Use an input variable for the token.
  • Set the TFE_TOKEN environment variable. The provider can read the TFE_TOKEN environment variable and the token stored there to authenticate.

HCP Authentication

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_id and client_secret argument in the provider configuration. Use input variables.
  • Set the HCP_CLIENT_ID and HCP_CLIENT_SECRET environment variables.

Features

  • HCP Waypoint Template
  • HCP Waypoint Add-on

Documentation

Requirements

The following requirements are needed by this module:

Modules

No modules.

Required Inputs

The following input variables are required:

Description: (Required) Name of the organization.

Type: string

Optional Inputs

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"
  }
]

Resources

The following resources are used by this module:

Outputs

No outputs.

About

Code to provision and manage HCP Waypoint for Workspaces Factory using Terraform code (IaC).

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •