security-group

devops4me/security-group/aws

Terraform Module HCL AWS

This module refactors repetitive security group definitions and can compact 200 lines into 5.

Install
module "security-group" {
source = "devops4me/security-group/aws"
version = "1.0.0"
}
plain text: /constructs/tfmod-devops4me-security-group-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Create Security Group Rules | Terraform Module You avoid hundreds of lines of similar security group definitions by using this rule creation module. In just one line with words like ssh, https, sftp, rabbitmq, openvpn or all-traffic you specify every AWS security group rule that you need. This module always creates a new security group because Terraform cannot correctly adopt the VPC's default security group - it exhibits problems setting the descriptions and fails as it attempts to destroy it. Usage module security_group { source = "devops4me/security-group/aws" version = "~> 1.0.0" in_ingress = [ "ssh", "http", "https" ] in_vpc_id = module.vpc.out_vpc_id } resource aws_instance ec2 { vpc_security_group_ids = [ module.security_group.out_security_group_id ] } out_security_group_id is the f

Inputs (10)
NameTypeDescriptionDefault
in_vpc_idstringMandatory umbrella vpc the security group falls under which reverts to the defau required
in_ingresslist4 element list defining traffic to allow in (see traffic-rules.tf)[ "ssh" ]
in_mandated_tagsmapOptional tags unless your organization mandates that a set of given tags must be{}
in_ingress_cidr_blockslistThe IPv4 CIDR ranges from which traffic is allowed to originate.[ "0.0.0.0/0" ]
in_egress_cidr_blockslistList of IPv4 CIDR ranges to use on all egress rules[ "0.0.0.0/0" ]
in_ecosystemstringCreational stamp binding all infrastructure components created on behalf of this"security-grp"
in_timestampstringA timestamp for resource tags in the format ymmdd-hhmm like 80911-1435"timestamp"
in_descriptionstringUbiquitous note detailing who, when, where and why for every infrastructure comp"This VPC network was created for an eco
rulesmap( list( string ) ){ "all-traffic": [ "-1", "-1",
in_egresslist4 element list defining traffic to allow out (see traffic-rules.tf)[ "all-traffic" ]
Outputs (1)
out_security_group_id — The string ID of either the default security group or the just created new one.
Resources (2)
aws_security_groupaws_security_group_rule
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.0
Cloud AWS
★ Stars4
Forks5
Total downloads6.7k
Inputs10
Outputs1
Resources2
LicenseMIT
Namespacedevops4me
Updated