Skip to content

Commit 368960b

Browse files
authored
[Docs] update hcp_waypoint_template example code (#1331)
* update template example code * move changes to example file * re-include extra returns
1 parent e5a7ed9 commit 368960b

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

examples/resources/hcp_waypoint_template/resource.tf

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
resource "hcp_waypoint_template" "template" {
2-
name = "go-k8s-microservice"
3-
summary = "A simple Go microservice running on Kubernetes."
4-
description = <<EOF
5-
This template deploys a simple Go microservice to Kubernetes. The microservice
6-
is a simple HTTP server that listens on port 8080 and returns a JSON response.
7-
The template includes a Dockerfile, Kubernetes manifests, and boiler plate code
8-
for a gRPC service written in Go.
9-
EOF
10-
terraform_project_id = "prj-123456"
11-
labels = ["go", "kubernetes"]
12-
terraform_no_code_module_source = "private/fake-org/go-k8s-microservice/kubernetes"
13-
terraform_no_code_module_id = "nocode-123456"
1+
resource "tfe_project" "example" {
2+
name = "waypoint-build-destination"
3+
organization = var.org_name
4+
}
5+
6+
data "tfe_registry_module" "example" {
7+
organization = var.org_name
8+
name = "my-nocode-example-module"
9+
module_provider = "aws"
10+
}
11+
12+
resource "hcp_waypoint_template" "example" {
13+
name = "example-aws-template"
14+
summary = "AWS waypoint deployment."
15+
description = "Deploys a nocode module."
16+
terraform_project_id = tfe_project.example.id
17+
labels = ["pets"]
18+
terraform_no_code_module_source = data.tfe_registry_module.example.no_code_module_source
19+
terraform_no_code_module_id = data.tfe_registry_module.example.no_code_module_id
1420
variable_options = [
1521
{
1622
name = "resource_size"

0 commit comments

Comments
 (0)