Terraform Module for AWS and HashiCorp Cloud Platform
This module configures the following components for HCP:
- HashiCorp Virtual Network (HVN)
- Routing tables and peering connection between an AWS VPC and HVN
- (Optional) HashiCorp Cloud Platform (HCP) Consul cluster (development tier)
- (Optional) Security groups rules to allow HCP Consul on AWS
- (Optional) HashiCorp Cloud Platform (HCP) Vault cluster (development tier)
Prerequisites
You must have access to HashiCorp Cloud Platform (HCP).
Create an HCP service principal
before using the HCP Provider for Terraform.
Requirements
Providers
Name |
Version |
aws |
4.14.0 |
hcp |
0.29.0 |
Modules
No modules.
Resources
Inputs
Name |
Description |
Type |
Default |
Required |
hcp_consul_datacenter |
Datacenter for HCP Consul cluster. If undefined, uses hcp_consul_name . |
string |
null |
no |
hcp_consul_name |
Name for HCP Consul cluster. If left as an empty string, a cluster will not be created. |
string |
"" |
no |
hcp_consul_public_endpoint |
Enable public endpoint for HCP Consul cluster. |
bool |
false |
no |
hcp_consul_security_group_ids |
Security Group IDs to allow HCP Consul. |
list(string) |
[] |
no |
hcp_consul_tier |
Tier for HCP Consul cluster. Must be development , standard , or plus . |
string |
"development" |
no |
hcp_consul_version |
Minimum Consul version. Defaults to HCP recommendation. |
string |
null |
no |
hcp_vault_name |
Name for HCP Vault cluster. If left as an empty string, a cluster will not be created. |
string |
"" |
no |
hcp_vault_public_endpoint |
Enable public endpoint for HCP Vault cluster. |
bool |
false |
no |
hcp_vault_tier |
Tier for HCP Vault cluster. See pricing information |
string |
"dev" |
no |
hcp_vault_version |
Minimum Vault version. Defaults to HCP recommendation. |
string |
null |
no |
hvn_cidr_block |
CIDR Block of HashiCorp Virtual Network. Cannot overlap with vpc_cidr_block . |
string |
n/a |
yes |
hvn_name |
Name of HashiCorp Virtual Network. |
string |
n/a |
yes |
hvn_peer |
Peer HVN to VPC. |
bool |
true |
no |
hvn_region |
AWS region for HashiCorp Virtual Network. |
string |
n/a |
yes |
number_of_route_table_ids |
Number of routing table ids. Works around GH-4149. |
number |
0 |
no |
route_table_ids |
List of routing table IDs to route to HVN peering connection. |
list(string) |
[] |
no |
tags |
Map of tags for resources |
map(string) |
{} |
no |
vpc_cidr_block |
CIDR Block of VPC. Cannot overlap with hvn_cidr_block . |
string |
"" |
no |
vpc_id |
ID of VPC. |
string |
"" |
no |
vpc_owner_id |
Owner ID of VPC. |
string |
"" |
no |
Outputs