From e2acdfc668b2dcc696922e273c655f3adedbebbe Mon Sep 17 00:00:00 2001 From: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com> Date: Fri, 7 May 2021 16:09:10 -0700 Subject: [PATCH 1/6] add note about release stage for internal contributors --- .github/PULL_REQUEST_TEMPLATE.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 192cf8c5a..d5df96816 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,10 @@ ### :hammer_and_wrench: Description From 921f32cc6406451f509c81931d386f1d00e0bc49 Mon Sep 17 00:00:00 2001 From: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com> Date: Fri, 7 May 2021 16:34:59 -0700 Subject: [PATCH 2/6] merge quick-start context into overview and remove quick-start --- docs/guides/quick-start.md | 42 ---------------------------- docs/index.md | 11 ++++++++ templates/guides/quick-start.md.tmpl | 21 -------------- templates/index.md.tmpl | 11 ++++++++ 4 files changed, 22 insertions(+), 63 deletions(-) delete mode 100644 docs/guides/quick-start.md delete mode 100644 templates/guides/quick-start.md.tmpl diff --git a/docs/guides/quick-start.md b/docs/guides/quick-start.md deleted file mode 100644 index 36a7dd76f..000000000 --- a/docs/guides/quick-start.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -subcategory: "" -page_title: "Create resources in HCP - HCP Provider" -description: |- - An example of creating HCP resources with optional fields defaulted. ---- - -# Create an HCP HVN, Peering, and Consul cluster - -Everything in HashiCorp Cloud Platform (HCP) starts with the HashiCorp Virtual Network (HVN). - -HVNs enable you to deploy HashiCorp Cloud products without having to manage the networking details. They give you a simple setup for creating a network on AWS, in the region of your choice, and with the option to specify a CIDR range. - -Creating a network peering from your HVN will allow you to connect and launch AWS resources to your HCP account. -Peer your Amazon VPC with your HVN to enable resource access. After creating, you will need to accept the peering request and set up your VPC’s security groups and routing table on your AWS account. The Amazon VPC can be managed with the [AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs). - -Once you have an HVN, HCP Consul enables you to quickly deploy Consul servers in AWS across a variety of environments while offloading the operations burden to the SRE experts at HashiCorp. - -Finally, with a fully deployed HCP Consul, you need to deploy Consul clients inside of the peered VPC to fully access your Consul features. - -```terraform -resource "hcp_hvn" "example_hvn" { - hvn_id = "hcp-tf-example-hvn" - cloud_provider = "aws" - region = "us-west-2" - cidr_block = "172.25.16.0/20" -} - -resource "hcp_consul_cluster" "example_consul_cluster" { - hvn_id = hcp_hvn.example_hvn.hvn_id - cluster_id = "hcp-tf-example-consul-cluster" - tier = "development" -} - -resource "hcp_aws_network_peering" "example_peering" { - hvn_id = hcp_hvn.example_hvn.hvn_id - peer_vpc_id = "vpc-2f09a348" - peer_account_id = "1234567890" - peer_vpc_region = "us-west-2" - peer_vpc_cidr_block = "10.0.1.0/24" -} -``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 4302c47ff..0500832a0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,6 +20,17 @@ The HCP provider supports authentication via a Client ID and a Client Secret. Th ## Example Usage +Everything in HashiCorp Cloud Platform (HCP) starts with the HashiCorp Virtual Network (HVN). + +HVNs enable you to deploy HashiCorp Cloud products without having to manage the networking details. They give you a simple setup for creating a network on AWS, in the region of your choice, and with the option to specify a CIDR range. + +Creating a network peering from your HVN will allow you to connect and launch AWS resources to your HCP account. +Peer your Amazon VPC with your HVN to enable resource access. After creating, you will need to accept the peering request and set up your VPC’s security groups and routing table on your AWS account. The Amazon VPC can be managed with the [AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs). + +Once you have an HVN, HCP Consul and HCP Vault enable you to quickly deploy Consul and Vault clusters in AWS across a variety of environments while offloading the operations burden to the SRE experts at HashiCorp. + +One final note: with a fully deployed HCP Consul, you need to deploy Consul clients inside of the peered VPC to fully access your Consul features. + ```terraform // Pin the version terraform { diff --git a/templates/guides/quick-start.md.tmpl b/templates/guides/quick-start.md.tmpl deleted file mode 100644 index 68d1b622f..000000000 --- a/templates/guides/quick-start.md.tmpl +++ /dev/null @@ -1,21 +0,0 @@ ---- -subcategory: "" -page_title: "Create resources in HCP - HCP Provider" -description: |- - An example of creating HCP resources with optional fields defaulted. ---- - -# Create an HCP HVN, Peering, and Consul cluster - -Everything in HashiCorp Cloud Platform (HCP) starts with the HashiCorp Virtual Network (HVN). - -HVNs enable you to deploy HashiCorp Cloud products without having to manage the networking details. They give you a simple setup for creating a network on AWS, in the region of your choice, and with the option to specify a CIDR range. - -Creating a network peering from your HVN will allow you to connect and launch AWS resources to your HCP account. -Peer your Amazon VPC with your HVN to enable resource access. After creating, you will need to accept the peering request and set up your VPC’s security groups and routing table on your AWS account. The Amazon VPC can be managed with the [AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs). - -Once you have an HVN, HCP Consul enables you to quickly deploy Consul servers in AWS across a variety of environments while offloading the operations burden to the SRE experts at HashiCorp. - -Finally, with a fully deployed HCP Consul, you need to deploy Consul clients inside of the peered VPC to fully access your Consul features. - -{{ tffile "examples/guides/quick_start/main.tf" }} \ No newline at end of file diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl index 5e4af9d34..44b4ea96a 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -20,6 +20,17 @@ The HCP provider supports authentication via a Client ID and a Client Secret. Th ## Example Usage +Everything in HashiCorp Cloud Platform (HCP) starts with the HashiCorp Virtual Network (HVN). + +HVNs enable you to deploy HashiCorp Cloud products without having to manage the networking details. They give you a simple setup for creating a network on AWS, in the region of your choice, and with the option to specify a CIDR range. + +Creating a network peering from your HVN will allow you to connect and launch AWS resources to your HCP account. +Peer your Amazon VPC with your HVN to enable resource access. After creating, you will need to accept the peering request and set up your VPC’s security groups and routing table on your AWS account. The Amazon VPC can be managed with the [AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs). + +Once you have an HVN, HCP Consul and HCP Vault enable you to quickly deploy Consul and Vault clusters in AWS across a variety of environments while offloading the operations burden to the SRE experts at HashiCorp. + +One final note: with a fully deployed HCP Consul, you need to deploy Consul clients inside of the peered VPC to fully access your Consul features. + {{tffile "examples/provider/provider.tf"}} {{ .SchemaMarkdown | trimspace }} \ No newline at end of file From 730034a96adcca0e12f9af2ae87053fb4d7b33dd Mon Sep 17 00:00:00 2001 From: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com> Date: Fri, 7 May 2021 16:37:58 -0700 Subject: [PATCH 3/6] remove federation example as that feature is still in beta --- docs/index.md | 8 -------- examples/provider/provider.tf | 8 -------- 2 files changed, 16 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0500832a0..fc1b39816 100644 --- a/docs/index.md +++ b/docs/index.md @@ -88,14 +88,6 @@ resource "hcp_consul_cluster" "example" { tier = "development" } -// Create a secondary Consul cluster to federate with the existing Consul cluster -resource "hcp_consul_cluster" "example_secondary" { - hvn_id = hcp_hvn.example_hvn.hvn_id - cluster_id = "hcp-tf-example-consul-cluster-secondary" - tier = "development" - primary_link = hcp_consul_cluster.example.self_link -} - // Create a Vault cluster in the same region and cloud provider as the HVN resource "hcp_vault_cluster" "example" { cluster_id = "hcp-tf-example-vault-cluster" diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 971f3622b..c471ead0e 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -54,14 +54,6 @@ resource "hcp_consul_cluster" "example" { tier = "development" } -// Create a secondary Consul cluster to federate with the existing Consul cluster -resource "hcp_consul_cluster" "example_secondary" { - hvn_id = hcp_hvn.example_hvn.hvn_id - cluster_id = "hcp-tf-example-consul-cluster-secondary" - tier = "development" - primary_link = hcp_consul_cluster.example.self_link -} - // Create a Vault cluster in the same region and cloud provider as the HVN resource "hcp_vault_cluster" "example" { cluster_id = "hcp-tf-example-vault-cluster" From 5c31da6996f9aa70f2d531ed3467039df3b63988 Mon Sep 17 00:00:00 2001 From: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com> Date: Mon, 10 May 2021 14:12:04 -0700 Subject: [PATCH 4/6] add federation beta banner to consul cluster --- docs/resources/consul_cluster.md | 4 ++-- templates/resources/consul_cluster.md.tmpl | 23 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 templates/resources/consul_cluster.md.tmpl diff --git a/docs/resources/consul_cluster.md b/docs/resources/consul_cluster.md index a4e186ed4..22d355392 100644 --- a/docs/resources/consul_cluster.md +++ b/docs/resources/consul_cluster.md @@ -1,5 +1,4 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "hcp_consul_cluster Resource - terraform-provider-hcp" subcategory: "" description: |- @@ -27,6 +26,7 @@ resource "hcp_consul_cluster" "example" { } ``` +-> **Note:** The `primary_link` attribute is related to federation, a feature that is currently in private beta. ## Schema @@ -83,4 +83,4 @@ Import is supported using the following syntax: ```shell # The import ID is {cluster_id} terraform import hcp_consul_cluster.example consul-cluster -``` +``` \ No newline at end of file diff --git a/templates/resources/consul_cluster.md.tmpl b/templates/resources/consul_cluster.md.tmpl new file mode 100644 index 000000000..074e6475e --- /dev/null +++ b/templates/resources/consul_cluster.md.tmpl @@ -0,0 +1,23 @@ +--- +page_title: "{{.Type}} {{.Name}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Type}} ({{.Name}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{ tffile "examples/resources/hcp_consul_cluster/resource.tf" }} + +-> **Note:** The `primary_link` attribute is related to federation, a feature that is currently in private beta. +{{ .SchemaMarkdown | trimspace }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" "examples/resources/hcp_consul_cluster/import.sh" }} \ No newline at end of file From 55d0d6b33f2072966a9f71a557cff131bd807577 Mon Sep 17 00:00:00 2001 From: Brenna Hewer-Darroch <21015366+bcmdarroch@users.noreply.github.com> Date: Mon, 10 May 2021 14:22:24 -0700 Subject: [PATCH 5/6] Hashicorp -> HashiCorp TM --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d5df96816..c92a1af05 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@