A Terraform security group module for just HTTPS, useful for external ELB instances.
- TCP 443 (HTTPS)
security_group_name- The name for your security group, e.g.bluffdale_web_stage1vpc_id- The VPC this security group should be created in.source_cidr_block- The source CIDR block, defaults to0.0.0.0/0for 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_web" {
source = "github.com/terraform-community-modules/tf_aws_sg//sg_https_only"
security_group_name = "${var.security_group_name}-https"
vpc_id = "${var.vpc_id}"
source_cidr_block = ["${var.source_cidr_block}"]
}
- Setting values for the following variables, either through
terraform.tfvarsor-vararguments on the CLI
- security_group_name
- vpc_id
- source_cidr_block