- Notifications
You must be signed in to change notification settings - Fork15
Terraform module for HCP Consul on AWS
License
hashicorp/terraform-aws-hcp-consul
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Terraform module for connecting a HashiCorp Cloud Platform (HCP) Consul cluster to AWS.
This module connects a HashiCorp Virtual Network (HVN) with an AWS VPC, ensuringthat all networking rules are in place to allow a Consul client to communicatewith the HCP Consul servers. The module accomplishes this in four steps:
- Create and accept a peering connection between the HVN and VPC
- Create HVN routes that will direct HCP traffic to the CIDR ranges of thesubnets.
- Create AWS routes for each AWS route table that will direct traffic to theHVN's own CIDR range.
- Create AWS ingress rules necessary for HCP Consul to communicate to Consulclients.
module"aws_hcp_consul" {source="hashicorp/hcp-consul/aws"hvn=hcp_hvn.mainvpc_id="vpc-0daa4a0915f1857db"subnet_ids=["subnet-098e9eb4bdd582522","subnet-198e9eb4bdd582522"]route_table_ids=["rtb-079170034b7a99118","rtb-179170034b7a99118"]# Optionally provide security_group_ids. A new security group will be created# if none are provided.security_group_ids=["sg-0ba8d296a786e93c7"]}
A number of examples are provided which will run the following setup:
- Create an AWS VPC and associated resources
- Create a HashiCorp Virtual Network (HVN)
- Peer the AWS VPC with the HVN
- Create a HCP Consul cluster
- Run Consul clients within the provisioned AWS VPC
- Run a demo application on the chosen AWS runtime
These examples allow you to easily research and demo HCP Consul.
- hcp-ec2-demo - Use EC2 virtual machines to run Consul clients.
- hcp-eks-demo - Provision and use an EKS cluster to run Consul clients.
To support these examples, a few submodules are provided as useful utilities,for learning and experimentation purposes.
- hcp-ec2-client - [For Testing Only]: installs Consul and runs Consul clients with EC2 virtual machines.
- hcp-eks-client - [For Testing Only]: installs theConsul Helm chart on the provided Kubernetes cluster.
- k8s-demo-app - [For Testing Only]: installs a demo application onto the Kubernetes cluster, using the Consul service mesh.
This code is released under the Mozilla Public License 2.0. Please seeLICENSE for more details.
About
Terraform module for HCP Consul on AWS
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.