Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Terraform
  3. terraform-aws-security-group

terraform-aws-security-group

NOASSERTIONHCLv6.0.0

A Terraform module for creating and managing AWS EC2-VPC Security Groups with comprehensive rule support.

Visit WebsiteGitHubGitHub
592 stars1.1k forks0 contributors

What is terraform-aws-security-group?

terraform-aws-security-group is a Terraform module designed to create and manage AWS EC2-VPC Security Groups. It provides a comprehensive and declarative way to define network security rules for AWS resources, supporting all AWS features like IPv4/IPv6 CIDR blocks, prefix lists, and source security groups. The module solves the problem of manually configuring complex security group rules by offering reusable, predefined rule sets and flexible customization options.

Target Audience

DevOps engineers, cloud architects, and infrastructure developers who use Terraform to manage AWS infrastructure and need to implement consistent, scalable network security policies.

Value Proposition

Developers choose this module because it offers a complete implementation of AWS Security Group features, reduces boilerplate code, and provides predefined rule groups for common services, accelerating deployment while maintaining flexibility and compatibility across Terraform versions.

Overview

Terraform module to create AWS Security Group resources 🇺🇦

Use Cases

Best For

  • Defining security groups for web servers (HTTP/HTTPS) in AWS VPCs
  • Securing database instances (MySQL, PostgreSQL, Redis) with custom ingress rules
  • Managing network access for microservices and containerized applications
  • Implementing conditional security group creation in dynamic environments
  • Handling complex security group rules with computed values and prefix lists
  • Standardizing security group configurations across multiple AWS accounts or projects

Not Ideal For

  • Projects needing only a few simple security group rules where native Terraform resources suffice
  • Teams using Infrastructure-as-Code tools other than Terraform, like CloudFormation or Pulumi
  • Environments where strict control over every AWS API parameter is required without abstraction
  • Organizations with policies against third-party modules due to security or compliance concerns

Pros & Cons

Pros

Comprehensive AWS Support

Implements all AWS-supported security group arguments, including IPv4/IPv6 CIDR blocks, prefix lists, and source security groups, as stated in the README's feature list.

Predefined Rule Groups

Offers named groups for common services like SSH, HTTP, and databases, accelerating configuration with modules like http-80 and mysql, detailed in the modules directory.

Flexible Configuration Options

Supports both custom rule definitions and predefined sets, with conditional creation and computed value handling for dynamic environments, shown in the usage examples.

Terraform Version Compatibility

Maintains support from Terraform 0.11 to modern versions, ensuring broad usability across different project setups, as outlined in the Terraform versions section.

Cons

Complex Computed Value Handling

Requires verbose workarounds for computed values in Terraform 0.11, using special 'computed_' arguments and 'number_of_' counters, which adds complexity and boilerplate.

Steep Configuration Learning Curve

With over 50 input variables and numerous rule types, the module can be overwhelming for simple use cases, leading to potential misconfiguration.

Vendor and Tool Lock-in

Tightly coupled with AWS and Terraform, limiting portability to other clouds or IaC tools, and dependent on the module maintainer for updates.

Frequently Asked Questions

Quick Stats

Stars592
Forks1,137
Contributors0
Open Issues2
Last commit1 month ago
CreatedSince 2017

Tags

#devops#vpc#aws-vpc#terraform#infrastructure-as-code#terraform-module#iac#network-security#aws#cloud-security

Built With

T
Terraform
A
AWS

Links & Resources

Website

Included in

Terraform6.3k
Auto-fetched 18 hours ago

Related Projects

terraform-aws-eksterraform-aws-eks

Terraform module to create Amazon Elastic Kubernetes (EKS) resources 🇺🇦

Stars4,988
Forks4,404
Last commit1 month ago
terraform-aws-vpcterraform-aws-vpc

Terraform module to create AWS VPC resources 🇺🇦

Stars3,249
Forks4,631
Last commit3 months ago
stackstack

A set of Terraform modules for configuring production infrastructure with AWS

Stars2,089
Forks410
Last commit3 years ago
typhoontyphoon

Minimal and free Kubernetes distribution with Terraform

Stars2,046
Forks324
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub