Patterned Designs HCL Module Registry
v0.1.0 latest View all versions

Terraform module for security-group on aws

View Full Documentation Usage guides, examples & best practices
module "security-group" {
  source  = "registry.patterneddesigns.ca/patterneddesigns/security-group/aws"
  version = "0.1.0"
}
name required
string

Name of the security group

Constraints
  • Security group name must be 1-255 characters.
vpc_id required
string

VPC ID where the security group will be created

Constraints
  • VPC ID must be a valid vpc-* identifier.
ingress_rules
list(object({ from_port = number to_port = number protocol = string cidr_blocks = optional(list(string), []) description = optional(string, "") })) default: null

List of ingress rules

Constraints
  • Protocol must be tcp, udp, icmp, or -1 (all).
egress_rules
list(object({ from_port = number to_port = number protocol = string cidr_blocks = optional(list(string), []) description = optional(string, "") })) default: [ { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"]

List of egress rules

Constraints
  • Protocol must be tcp, udp, icmp, or -1 (all).
tags
map(string) default: null

Tags to apply to all resources

publish_ssm_parameters
bool default: true

Publish security group metadata to SSM Parameter Store for discovery by other modules

security_group_id

ID of the security group

security_group_arn

ARN of the security group

security_group_name

Name of the security group

ssm_parameter_paths

SSM parameter paths where security group metadata is published