A Terraform security group module for Consul
- TCP 8300 (Server RPC)
- TCP 8301 (Serf LAN)
- UDP 8301 (Serf LAN)
- TCP 8302 (Serf WAN)
- UDP 8302 (Serf WAN)
- TCP 8400 (Consul RPC)
- TCP 8500 (Consul HTTP API)
- TCP 8600 (Consul DNS)
- UDP 8600 (Consul DNS)
security_group_name
- The name for your security group, e.g.bluffdale_consul_stage1
vpc_id
- The VPC this security group should be created in.source_cidr_block
- The source CIDR block, defaults to0.0.0.0/0
for this module.
You can use these in your terraform template with the following steps.
- Adding a module resource to your template, e.g.
main.tf
module "sg_consul" {
source = "github.com/terraform-community-modules/tf_aws_sg//sg_consul"
security_group_name = "${var.security_group_name}-consul"
vpc_id = "${var.vpc_id}"
source_cidr_block = ["${var.source_cidr_block}"]
}
- Setting values for the following variables, either through
terraform.tfvars
or-var
arguments on the CLI
- security_group_name
- vpc_id
- source_cidr_block