Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ Default:

The following resources are used by this module:

- [hcp_waypoint_add_on_definition.this](https://registry.terraform.io/providers/hashicorp/hcp/0.110.0/docs/resources/waypoint_add_on_definition) (resource)
- [hcp_waypoint_template.this](https://registry.terraform.io/providers/hashicorp/hcp/0.110.0/docs/resources/waypoint_template) (resource)
- [tfe_project.add_on_project](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project) (data source)
- [tfe_project.this](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/project) (data source)
- [tfe_registry_module.add_on_module](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/registry_module) (data source)
- [tfe_registry_module.this](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/data-sources/registry_module) (data source)

## Outputs
Expand Down
33 changes: 33 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,37 @@ resource "hcp_waypoint_template" "this" {
lifecycle {
ignore_changes = [ readme_markdown_template ]
}
}

data "tfe_registry_module" "add_on_module" {
organization = var.organization
name = "workspacesfactory"
module_provider = "tfe"
}

data "tfe_project" "add_on_project" {
name = "Terraform Workspaces Factory"
organization = var.organization
}

resource "hcp_waypoint_add_on_definition" "this" {
name = "HCPTerraformWorkspace"
summary = "An add-on that provisions a HCP Terraform Workspace."
description = "This add-on provisions a HCP Terraform Workspace."
terraform_project_id = data.tfe_project.add_on_project.id
labels = ["hcp terraform", "workspace"]
terraform_no_code_module_source = data.tfe_registry_module.add_on_module.no_code_module_source
terraform_no_code_module_id = data.tfe_registry_module.add_on_module.no_code_module_id
variable_options = [
{
name = "name"
user_editable = true
variable_type = "string"
},
{
name = "project_name"
user_editable = true
variable_type = "string"
}
]
}