{"id":19188769,"url":"https://github.com/miquido/terraform-vpc","last_synced_at":"2026-02-04T14:03:43.465Z","repository":{"id":212425954,"uuid":"690914904","full_name":"miquido/terraform-vpc","owner":"miquido","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-13T14:30:56.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dependabot-terraform-vpc-1.1.0","last_synced_at":"2025-02-23T03:42:19.467Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miquido.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-09-13T06:22:08.000Z","updated_at":"2023-09-13T06:23:19.000Z","dependencies_parsed_at":"2025-02-23T03:42:22.409Z","dependency_job_id":"b6457d00-b250-4eb8-80c4-9763a6e5d350","html_url":"https://github.com/miquido/terraform-vpc","commit_stats":null,"previous_names":["miquido/terraform-vpc"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/miquido/terraform-vpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fterraform-vpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fterraform-vpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fterraform-vpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fterraform-vpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miquido","download_url":"https://codeload.github.com/miquido/terraform-vpc/tar.gz/refs/heads/dependabot-terraform-vpc-1.1.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miquido%2Fterraform-vpc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263154276,"owners_count":23422008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-09T11:25:57.830Z","updated_at":"2026-02-04T14:03:43.353Z","avatar_url":"https://github.com/miquido.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. --\u003e\n[![Miquido][logo]](https://www.miquido.com/)\n\n# terraform-vpc\nProvides AWS VPC with Private Subnets and optional NAT Gateways.\n---\n**Terraform Module**\n\n\nGitLab Repository: https://gitlab.com/miquido/terraform/terraform-vpc\n\n## Usage\n\n\n### With single NAT gateway\n\n```hcl\nmodule \"vpc\" {\n  source                          = \"git::ssh://git@gitlab.com:miquido/terraform/terraform-vpc.git?ref=master\"\n  name                            = \"main\"\n  project                         = \"example\"\n  environment                     = \"dev\"\n  tags                            = var.tags\n  azs                             = [\"eu-central-1a\", \"eu-central-1b\", \"eu-central-1c\"]\n  nat_type                        = \"gateway-single\"\n  enable_ecs_fargate_private_link = false\n}\n```\n\nYou can also deploy VPC without NAT, with NAT instance or NAT gateway per AZ by modyfing value of `nat_type` variable.\n\u003c!-- markdownlint-disable --\u003e\n## Makefile Targets\n```text\nAvailable targets:\n\n  help                                Help screen\n  help/all                            Display help for all targets\n  help/short                          This help short screen\n  lint                                Lint Terraform code\n\n```\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- markdownlint-disable --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.13 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 4.1 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | ~\u003e 4.1 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_dynamic-subnets\"\u003e\u003c/a\u003e [dynamic-subnets](#module\\_dynamic-subnets) | git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git | 1.0.0 |\n| \u003ca name=\"module_label\"\u003e\u003c/a\u003e [label](#module\\_label) | git::https://github.com/cloudposse/terraform-terraform-label | 0.8.0 |\n| \u003ca name=\"module_vpc\"\u003e\u003c/a\u003e [vpc](#module\\_vpc) | git::https://github.com/cloudposse/terraform-aws-vpc.git | 0.28.1 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_eip.single-nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource |\n| [aws_nat_gateway.single-nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/nat_gateway) | resource |\n| [aws_route.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |\n| [aws_security_group.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |\n| [aws_security_group_rule.default-sg-allow-all-egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |\n| [aws_security_group_rule.default-sg-allow-self-ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |\n| [aws_vpc_endpoint.cloudwatch](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) | resource |\n| [aws_vpc_endpoint.ecr-api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) | resource |\n| [aws_vpc_endpoint.ecr-dkr](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) | resource |\n| [aws_vpc_endpoint.s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_endpoint) | resource |\n| [aws_vpc_endpoint_service.cloudwatch](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint_service) | data source |\n| [aws_vpc_endpoint_service.ecr-api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint_service) | data source |\n| [aws_vpc_endpoint_service.ecr-dkr](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint_service) | data source |\n| [aws_vpc_endpoint_service.s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint_service) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_azs\"\u003e\u003c/a\u003e [azs](#input\\_azs) | List of Availability Zones where subnets will be created | `list(string)` | `[]` | no |\n| \u003ca name=\"input_cidr\"\u003e\u003c/a\u003e [cidr](#input\\_cidr) | CIDR for the VPC | `string` | `\"10.0.0.0/16\"` | no |\n| \u003ca name=\"input_enable_ecs_fargate_private_link\"\u003e\u003c/a\u003e [enable\\_ecs\\_fargate\\_private\\_link](#input\\_enable\\_ecs\\_fargate\\_private\\_link) | Controls whether to create VPC Endpoints regarding AWS ECS with Fargate services in managed VPC | `bool` | `false` | no |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | Environment name | `string` | `\"\"` | no |\n| \u003ca name=\"input_instance_tenancy\"\u003e\u003c/a\u003e [instance\\_tenancy](#input\\_instance\\_tenancy) | A tenancy option for instances launched into the VPC | `string` | `\"default\"` | no |\n| \u003ca name=\"input_map_public_ip_on_launch\"\u003e\u003c/a\u003e [map\\_public\\_ip\\_on\\_launch](#input\\_map\\_public\\_ip\\_on\\_launch) | Instances launched into a public subnet should be assigned a public IP address | `bool` | `true` | no |\n| \u003ca name=\"input_max_subnet_count\"\u003e\u003c/a\u003e [max\\_subnet\\_count](#input\\_max\\_subnet\\_count) | Sets the maximum amount of subnets to deploy. 0 will deploy a subnet for every provided availablility zone (in `availability_zones` variable) within the region | `number` | `0` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Resource common name | `string` | n/a | yes |\n| \u003ca name=\"input_nat_instance_type\"\u003e\u003c/a\u003e [nat\\_instance\\_type](#input\\_nat\\_instance\\_type) | NAT Instance type | `string` | `\"t3.micro\"` | no |\n| \u003ca name=\"input_nat_type\"\u003e\u003c/a\u003e [nat\\_type](#input\\_nat\\_type) | Configure deployment of NAT instances/gateways for private subnets. Possible values are: gateway-per-az, gateway-single, instance-per-az and off. | `string` | `\"gateway-per-az\"` | no |\n| \u003ca name=\"input_private_network_acl_id\"\u003e\u003c/a\u003e [private\\_network\\_acl\\_id](#input\\_private\\_network\\_acl\\_id) | Network ACL ID that will be added to private subnets. If empty, a new ACL will be created | `string` | `\"\"` | no |\n| \u003ca name=\"input_private_subnets_additional_tags\"\u003e\u003c/a\u003e [private\\_subnets\\_additional\\_tags](#input\\_private\\_subnets\\_additional\\_tags) | Additional tags to be added to private subnets | `map(string)` | `{}` | no |\n| \u003ca name=\"input_project\"\u003e\u003c/a\u003e [project](#input\\_project) | Account/Project Name | `string` | n/a | yes |\n| \u003ca name=\"input_public_network_acl_id\"\u003e\u003c/a\u003e [public\\_network\\_acl\\_id](#input\\_public\\_network\\_acl\\_id) | Network ACL ID that will be added to public subnets. If empty, a new ACL will be created | `string` | `\"\"` | no |\n| \u003ca name=\"input_public_subnets_additional_tags\"\u003e\u003c/a\u003e [public\\_subnets\\_additional\\_tags](#input\\_public\\_subnets\\_additional\\_tags) | Additional tags to be added to public subnets | `map(string)` | `{}` | no |\n| \u003ca name=\"input_subnet_type_tag_key\"\u003e\u003c/a\u003e [subnet\\_type\\_tag\\_key](#input\\_subnet\\_type\\_tag\\_key) | Key for subnet type tag to provide information about the type of subnets, e.g. `cpco.io/subnet/type=private` or `cpco.io/subnet/type=public` | `string` | `\"miquido.com/subnet/type\"` | no |\n| \u003ca name=\"input_subnet_type_tag_value_format\"\u003e\u003c/a\u003e [subnet\\_type\\_tag\\_value\\_format](#input\\_subnet\\_type\\_tag\\_value\\_format) | This is using the format interpolation symbols to allow the value of the subnet\\_type\\_tag\\_key to be modified. | `string` | `\"%s\"` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags to apply on repository | `map(string)` | `{}` | no |\n| \u003ca name=\"input_vpc_main_security_group_allow_all_egress\"\u003e\u003c/a\u003e [vpc\\_main\\_security\\_group\\_allow\\_all\\_egress](#input\\_vpc\\_main\\_security\\_group\\_allow\\_all\\_egress) | Add rule to main security group that allows all egress traffic | `bool` | `true` | no |\n| \u003ca name=\"input_vpc_main_security_group_allow_self_ingress\"\u003e\u003c/a\u003e [vpc\\_main\\_security\\_group\\_allow\\_self\\_ingress](#input\\_vpc\\_main\\_security\\_group\\_allow\\_self\\_ingress) | Add rule to main security group that allows all ingress traffic from the same group | `bool` | `true` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_availability_zones\"\u003e\u003c/a\u003e [availability\\_zones](#output\\_availability\\_zones) | List of Availability Zones where subnets were created |\n| \u003ca name=\"output_igw_id\"\u003e\u003c/a\u003e [igw\\_id](#output\\_igw\\_id) | n/a |\n| \u003ca name=\"output_nat_gateway_ids\"\u003e\u003c/a\u003e [nat\\_gateway\\_ids](#output\\_nat\\_gateway\\_ids) | IDs of the NAT Gateways created |\n| \u003ca name=\"output_nat_instance_ids\"\u003e\u003c/a\u003e [nat\\_instance\\_ids](#output\\_nat\\_instance\\_ids) | IDs of the NAT Instances created |\n| \u003ca name=\"output_private_route_table_ids\"\u003e\u003c/a\u003e [private\\_route\\_table\\_ids](#output\\_private\\_route\\_table\\_ids) | IDs of the created private route tables |\n| \u003ca name=\"output_private_subnet_cidrs\"\u003e\u003c/a\u003e [private\\_subnet\\_cidrs](#output\\_private\\_subnet\\_cidrs) | CIDR blocks of the created private subnets |\n| \u003ca name=\"output_private_subnet_ids\"\u003e\u003c/a\u003e [private\\_subnet\\_ids](#output\\_private\\_subnet\\_ids) | IDs of the created private subnets |\n| \u003ca name=\"output_public_route_table_ids\"\u003e\u003c/a\u003e [public\\_route\\_table\\_ids](#output\\_public\\_route\\_table\\_ids) | IDs of the created public route tables |\n| \u003ca name=\"output_public_subnet_cidrs\"\u003e\u003c/a\u003e [public\\_subnet\\_cidrs](#output\\_public\\_subnet\\_cidrs) | CIDR blocks of the created public subnets |\n| \u003ca name=\"output_public_subnet_ids\"\u003e\u003c/a\u003e [public\\_subnet\\_ids](#output\\_public\\_subnet\\_ids) | IDs of the created public subnets |\n| \u003ca name=\"output_vpc_cidr\"\u003e\u003c/a\u003e [vpc\\_cidr](#output\\_vpc\\_cidr) | n/a |\n| \u003ca name=\"output_vpc_default_network_acl_id\"\u003e\u003c/a\u003e [vpc\\_default\\_network\\_acl\\_id](#output\\_vpc\\_default\\_network\\_acl\\_id) | The ID of the network ACL created by default on VPC creation |\n| \u003ca name=\"output_vpc_default_route_table_id\"\u003e\u003c/a\u003e [vpc\\_default\\_route\\_table\\_id](#output\\_vpc\\_default\\_route\\_table\\_id) | The ID of the route table created by default on VPC creation |\n| \u003ca name=\"output_vpc_default_security_group_id\"\u003e\u003c/a\u003e [vpc\\_default\\_security\\_group\\_id](#output\\_vpc\\_default\\_security\\_group\\_id) | The ID of the security group created by default on VPC creation |\n| \u003ca name=\"output_vpc_id\"\u003e\u003c/a\u003e [vpc\\_id](#output\\_vpc\\_id) | n/a |\n| \u003ca name=\"output_vpc_ipv6_association_id\"\u003e\u003c/a\u003e [vpc\\_ipv6\\_association\\_id](#output\\_vpc\\_ipv6\\_association\\_id) | The association ID for the IPv6 CIDR block |\n| \u003ca name=\"output_vpc_ipv6_cidr\"\u003e\u003c/a\u003e [vpc\\_ipv6\\_cidr](#output\\_vpc\\_ipv6\\_cidr) | The IPv6 CIDR block |\n| \u003ca name=\"output_vpc_main_route_table_id\"\u003e\u003c/a\u003e [vpc\\_main\\_route\\_table\\_id](#output\\_vpc\\_main\\_route\\_table\\_id) | The ID of the main route table associated with this VPC |\n| \u003ca name=\"output_vpc_main_security_group_id\"\u003e\u003c/a\u003e [vpc\\_main\\_security\\_group\\_id](#output\\_vpc\\_main\\_security\\_group\\_id) | The ID of the main security group associated with this VPC |\n\u003c!-- markdownlint-restore --\u003e\n\n\n## Developing\n\n1. Make changes in terraform files\n\n2. Regenerate documentation\n\n    ```bash\n    bash \u003c(git archive --remote=git@gitlab.com:miquido/terraform/terraform-readme-update.git master update.sh | tar -xO)\n    ```\n\n3. Run lint\n\n    ```\n    make lint\n    ```\n\n## Copyright\n\nCopyright © 2017-2022 [Miquido](https://miquido.com)\n\n\n\n### Contributors\n\n|  [![Konrad Obal][k911_avatar]][k911_homepage]\u003cbr/\u003e[Konrad Obal][k911_homepage] |\n|---|\n\n  [k911_homepage]: https://github.com/k911\n  [k911_avatar]: https://github.com/k911.png?size=150\n\n\n\n  [logo]: https://www.miquido.com/img/logos/logo__miquido.svg\n  [website]: https://www.miquido.com/\n  [gitlab]: https://gitlab.com/miquido\n  [github]: https://github.com/miquido\n  [bitbucket]: https://bitbucket.org/miquido\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fterraform-vpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiquido%2Fterraform-vpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiquido%2Fterraform-vpc/lists"}