{"id":29943228,"url":"https://github.com/sourcefuse/terraform-aws-arc-security-group","last_synced_at":"2026-02-12T09:32:42.130Z","repository":{"id":271180023,"uuid":"895070624","full_name":"sourcefuse/terraform-aws-arc-security-group","owner":"sourcefuse","description":"ARC module for AWS Security Group","archived":false,"fork":false,"pushed_at":"2026-01-12T06:14:11.000Z","size":4341,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-12T15:30:12.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcefuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T14:03:49.000Z","updated_at":"2026-01-12T06:13:58.000Z","dependencies_parsed_at":"2025-01-06T05:03:38.824Z","dependency_job_id":"0ba0d9a6-cd59-4b5b-a86c-c3e15749183b","html_url":"https://github.com/sourcefuse/terraform-aws-arc-security-group","commit_stats":null,"previous_names":["sourcefuse/terraform-aws-arc-security-group"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sourcefuse/terraform-aws-arc-security-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-security-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-security-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-security-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-security-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcefuse","download_url":"https://codeload.github.com/sourcefuse/terraform-aws-arc-security-group/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-security-group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29362819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T02:14:38.411Z","updated_at":"2026-02-12T09:32:42.124Z","avatar_url":"https://github.com/sourcefuse.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Module Structure](./static/banner.png)\n# [terraform-aws-arc-security-group](https://github.com/sourcefuse/terraform-aws-arc-security-group)\n\n\u003ca href=\"https://github.com/sourcefuse/terraform-aws-arc-security-group/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/sourcefuse/terraform-aws-arc-security-group.svg?style=for-the-badge\" alt=\"Latest Release\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/sourcefuse/terraform-aws-arc-security-group/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/sourcefuse/terraform-aws-arc-security-group.svg?style=for-the-badge\" alt=\"Last Updated\"/\u003e\u003c/a\u003e ![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge\u0026logo=terraform\u0026logoColor=white) ![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge\u0026logo=githubactions\u0026logoColor=white)\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=sourcefuse_terraform-aws-arc-security-group\u0026token=0e57ba3902cccbb2b9c0585a9859bccbf2d00e3c)](https://sonarcloud.io/summary/new_code?id=sourcefuse_terraform-aws-arc-security-group)\n\n[![Known Vulnerabilities](https://github.com/sourcefuse/terraform-aws-arc-security-group/actions/workflows/snyk.yaml/badge.svg)](https://github.com/sourcefuse/terraform-aws-arc-security-group/actions/workflows/snyk.yaml)\n\n## Introduction\n\nThe SourceFuse AWS Reference Architecture (ARC) Terraform module for creating and managing AWS security groups with customizable rules. It simplifies defining inbound and outbound rules for specific protocols, ports, and CIDR ranges, ensuring secure and efficient network traffic control in your infrastructure.\n\nFor more information about this repository and its usage, please see [Terraform AWS ARC Security Group Module Usage Guide](docs/module-usage-guide/README.md).\n\n### Prerequisites\nBefore using this module, ensure you have the following:\n\n- AWS credentials configured.\n- Terraform installed.\n- A working knowledge of Terraform.\n\n## Usage\nSee the `examples` folder for a complete example.\n\n```hcl\n\nlocals {\n  security_group_data = {\n    create      = true\n    description = \"Security Group for Loadbalancer\"\n\n    ingress_rules = [\n      {\n        description = \"Allow VPC traffic\"\n        cidr_block  = data.aws_vpc.this.cidr_block\n        from_port   = 0\n        ip_protocol = \"tcp\"\n        to_port     = 65535\n      },\n      {\n        description = \"Allow traffic from self\"\n        self        = true\n        from_port   = 0\n        ip_protocol = \"tcp\"\n        to_port     = 65535\n      },\n      {\n        description              = \"Allow traffic from security group\"\n        source_security_group_id = data.aws_security_group.default.id\n        from_port                = 0\n        ip_protocol              = \"tcp\"\n        to_port                  = 65535\n      }\n    ]\n\n    egress_rules = [\n      {\n        description = \"Allow all outbound traffic\"\n        cidr_block  = \"0.0.0.0/0\"\n        from_port   = -1\n        ip_protocol = \"-1\"\n        to_port     = -1\n      }\n    ]\n  }\n}\n\nmodule \"arc_security_group\" {\n  source  = \"sourcefuse/arc-security-group/aws\"\n  version = \"0.0.1\"\n\n  name          = \"${var.namespace}-${var.environment}-sg\"\n  vpc_id        = data.aws_vpc.this.id\n  ingress_rules = local.security_group_data.ingress_rules\n  egress_rules  = local.security_group_data.egress_rules\n\n  tags = module.tags.tags\n}\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e 1.4, \u003c 2.0.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 5.0, \u003c 7.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 5.80.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |\n| [aws_vpc_security_group_egress_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_egress_rule) | resource |\n| [aws_vpc_security_group_ingress_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description) | (optional) Description of Security Group | `string` | `null` | no |\n| \u003ca name=\"input_egress_rules\"\u003e\u003c/a\u003e [egress\\_rules](#input\\_egress\\_rules) | (optional) List of egress rules for the security group. | \u003cpre\u003elist(object({\u003cbr/\u003e    description                   = optional(string, null)\u003cbr/\u003e    cidr_ipv6                     = optional(string, null)\u003cbr/\u003e    cidr_block                    = optional(string, null)\u003cbr/\u003e    destination_security_group_id = optional(string, null)\u003cbr/\u003e    from_port                     = optional(number, null)\u003cbr/\u003e    ip_protocol                   = string\u003cbr/\u003e    to_port                       = optional(number, null)\u003cbr/\u003e    prefix_list_id                = optional(string, null)\u003cbr/\u003e    tags                          = optional(map(string), {})\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_ingress_rules\"\u003e\u003c/a\u003e [ingress\\_rules](#input\\_ingress\\_rules) | (optional) List of ingress rules for the security group. | \u003cpre\u003elist(object({\u003cbr/\u003e    description              = optional(string, null)\u003cbr/\u003e    cidr_ipv6                = optional(string, null)\u003cbr/\u003e    cidr_block               = optional(string, null)\u003cbr/\u003e    source_security_group_id = optional(string, null)\u003cbr/\u003e    from_port                = optional(number, null)\u003cbr/\u003e    ip_protocol              = string\u003cbr/\u003e    to_port                  = optional(number, null)\u003cbr/\u003e    prefix_list_id           = optional(string, null)\u003cbr/\u003e    self                     = optional(bool, false)\u003cbr/\u003e    tags                     = optional(map(string), {})\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Security Group name | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags for Security Group | `map(string)` | `{}` | no |\n| \u003ca name=\"input_vpc_id\"\u003e\u003c/a\u003e [vpc\\_id](#input\\_vpc\\_id) | VPC Id for creating security group | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_arn\"\u003e\u003c/a\u003e [arn](#output\\_arn) | Security Group ARN |\n| \u003ca name=\"output_egress_rule_arns\"\u003e\u003c/a\u003e [egress\\_rule\\_arns](#output\\_egress\\_rule\\_arns) | ARNs of the egress rules |\n| \u003ca name=\"output_egress_rule_ids\"\u003e\u003c/a\u003e [egress\\_rule\\_ids](#output\\_egress\\_rule\\_ids) | IDs of the egress rules |\n| \u003ca name=\"output_id\"\u003e\u003c/a\u003e [id](#output\\_id) | Security Group ID |\n| \u003ca name=\"output_ingress_rule_arns\"\u003e\u003c/a\u003e [ingress\\_rule\\_arns](#output\\_ingress\\_rule\\_arns) | ARNs of the ingress rules |\n| \u003ca name=\"output_ingress_rule_ids\"\u003e\u003c/a\u003e [ingress\\_rule\\_ids](#output\\_ingress\\_rule\\_ids) | IDs of the ingress rules |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Versioning  \nThis project uses a `.version` file at the root of the repo which the pipeline reads from and does a git tag.  \n\nWhen you intend to commit to `main`, you will need to increment this version. Once the project is merged,\nthe pipeline will kick off and tag the latest git commit.  \n\n## Development\n\n### Prerequisites\n\n- [terraform](https://learn.hashicorp.com/terraform/getting-started/install#installing-terraform)\n- [terraform-docs](https://github.com/segmentio/terraform-docs)\n- [pre-commit](https://pre-commit.com/#install)\n- [golang](https://golang.org/doc/install#install)\n- [golint](https://github.com/golang/lint#installation)\n\n### Configurations\n\n- Configure pre-commit hooks\n  ```sh\n  pre-commit install\n  ```\n\n### Versioning\n\nwhile Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch\n\nFor Example\n\n```sh\ngit commit -m \"your commit message #major\"\n```\nBy specifying this , it will bump the version and if you don't specify this in your commit message then by default it will consider patch and will bump that accordingly\n\n### Tests\n- Tests are available in `test` directory\n- Configure the dependencies\n  ```sh\n  cd test/\n  go mod init github.com/sourcefuse/terraform-aws-refarch-\u003cmodule_name\u003e\n  go get github.com/gruntwork-io/terratest/modules/terraform\n  ```\n- Now execute the test  \n  ```sh\n  go test -timeout  30m\n  ```\n\n## Authors\n\nThis project is authored by:\n- SourceFuse ARC Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-security-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-security-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-security-group/lists"}