diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 192cf8c5a..c92a1af05 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,10 @@ ### :hammer_and_wrench: Description 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..d7ba343e3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,7 +18,18 @@ See the Release Notes on Github for more detail. Please upgrade to the patch v0. The HCP provider supports authentication via a Client ID and a Client Secret. The [authentication guide](guides/auth.md) describes how to obtain client credentials. -## Example Usage +## Getting Started + +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 @@ -77,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/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/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" 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..812646536 100644 --- a/templates/index.md.tmpl +++ b/templates/index.md.tmpl @@ -18,7 +18,18 @@ See the Release Notes on Github for more detail. Please upgrade to the patch v0. The HCP provider supports authentication via a Client ID and a Client Secret. The [authentication guide](guides/auth.md) describes how to obtain client credentials. -## Example Usage +## Getting Started + +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"}} 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