Skip to content

benoitblais-hashicorp-demo/HCPWaypoint-RepositoriesFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HCP Waypoint Repositories Factory

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

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

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

Resources

The following resources are used by this module:

Outputs

No outputs.

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages