{"id":20801932,"url":"https://github.com/philips-software/terraform-aws-vpc","last_synced_at":"2025-05-11T16:32:21.873Z","repository":{"id":54681596,"uuid":"136422862","full_name":"philips-software/terraform-aws-vpc","owner":"philips-software","description":"Terraform module to create an AWS VPC (public, or public and private)","archived":true,"fork":false,"pushed_at":"2023-05-08T18:23:27.000Z","size":78,"stargazers_count":5,"open_issues_count":2,"forks_count":20,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-04-04T02:26:31.657Z","etag":null,"topics":["aws","infrastructure-as-code","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philips-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2018-06-07T04:44:19.000Z","updated_at":"2025-01-13T16:07:01.000Z","dependencies_parsed_at":"2022-08-13T23:50:45.133Z","dependency_job_id":null,"html_url":"https://github.com/philips-software/terraform-aws-vpc","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fterraform-aws-vpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fterraform-aws-vpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fterraform-aws-vpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fterraform-aws-vpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips-software","download_url":"https://codeload.github.com/philips-software/terraform-aws-vpc/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253595741,"owners_count":21933443,"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":["aws","infrastructure-as-code","terraform"],"created_at":"2024-11-17T18:26:32.642Z","updated_at":"2025-05-11T16:32:21.866Z","avatar_url":"https://github.com/philips-software.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform module for creating a vpc\n\nThis module creates one VPC, by default it creates public and private subnets in all the availability zones for the selected region.\n\n## Terraform version\n\n- Terraform 0.12: Pin module to `~\u003e 2+`, submit pull request to branch `develop`\n- Terraform 0.11: Pin module to `~\u003e 1.x`, submit pull request to branch `terraform011`\n\n## Example usages:\n\nSee the [examples](./examples) for executable examples.\n\n```\nmodule \"vpc\" {\n  source = \"github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0\"\n\n  environment = \"my-awsome-project\"\n  aws_region  = \"eu-west-1\"\n\n  // optional, defaults\n  project                    = \"Forest\"\n  create_private_hosted_zone = \"false\"  // default = true\n  create_private_subnets     = \"false\"  // default = true\n\n  // example to override default availability_zones\n  availability_zones = [\"eu-west-1a\", \"eu-west-1b\", \"eu-west-1c\"]\n\n  // add aditional tags\n  tags = {\n    my-tag = \"my-new-tag\"\n  }\n}\n```\n\n## Inputs\n\n| Name                                        | Description                                                                                                               |    Type     |     Default     | Required |\n| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | :---------: | :-------------: | :------: |\n| availability\\_zones                         | List to specify the availability zones for which subnes will be created. By default all availability zones will be used.  |    list     |    `\u003clist\u003e`     |    no    |\n| aws\\_region                                 | The Amazon region                                                                                                         |   string    |       n/a       |   yes    |\n| cidr\\_block                                 | The CIDR block used for the VPC.                                                                                          |   string    | `\"10.0.0.0/16\"` |    no    |\n| create\\_private\\_hosted\\_zone               | Indicate to create a private hosted zone.                                                                                 |    bool     |    `\"true\"`     |    no    |\n| create\\_private\\_subnets                    | Indicates to create private subnets.                                                                                      |    bool     |    `\"true\"`     |    no    |\n| create\\_s3\\_vpc\\_endpoint                   | Whether to create a VPC Endpoint for S3, so the S3 buckets can be used from within the VPC without using the NAT gateway. |    bool     |    `\"true\"`     |    no    |\n| enable\\_create\\_defaults                    | Add tags to the default resources.                                                                                        |    bool     |    `\"false\"`    |    no    |\n| environment                                 | Environment name, will be added for resource tagging.                                                                     |   string    |       n/a       |   yes    |\n| private\\_subnet\\_tags                       | Map of tags to apply on the private subnets                                                                               | map(string) |     `\u003cmap\u003e`     |    no    |\n| project                                     | Project name, will be added for resource tagging.                                                                         |   string    |      `\"\"`       |    no    |\n| public\\_subnet\\_map\\_public\\_ip\\_on\\_launch | Enable public ip creaton by default on EC2 instance launch.                                                               |    bool     |    `\"false\"`    |    no    |\n| public\\_subnet\\_tags                        | Map of tags to apply on the public subnets                                                                                | map(string) |     `\u003cmap\u003e`     |    no    |\n| tags                                        | Map of tags to apply on the resources                                                                                     | map(string) |     `\u003cmap\u003e`     |    no    |\n\n## Outputs\n\n| Name                           | Description                               |\n| ------------------------------ | ----------------------------------------- |\n| availability\\_zones            | List of the availability zones.           |\n| nat\\_gateway\\_public\\_ip       | Public IP address of the NAT gateway.     |\n| private\\_dns\\_zone\\_id         | ID of the the private DNS zone, optional. |\n| private\\_domain\\_name          | Private domain name, optional.            |\n| private\\_subnets               | List of the private subnets.              |\n| private\\_subnets\\_route\\_table |                                           |\n| public\\_subnets                | List of the public subnets.               |\n| public\\_subnets\\_route\\_table  |                                           |\n| vpc\\_cidr                      | VPC CDIR.                                 |\n| vpc\\_id                        | ID of the VPC.                            |\n\n# VPC for Amazon EKS\n\nAmazon EKS (Elastic Kubernetes Service) requires that both VPCs and Subnets (public and private) are tagged specifically with certain values according to the [aws-eks-docs].\n\nTherefore, if the VPC created using this module is targeted for EKS, tag it with\n\n```terraform\n  tags = {\n    \"kubernetes.io/cluster/\u003ccluster-name\u003e\" = \"my-new-tag\"\n  }\n```\n\n## Subnets Tags\n\nAs stated above, tagging the subnets is also mandatory for EKS Clusters. The tags for public and private subnets are as follows, respectively:\n\n### Public Subnet Tags\n\n```terraform\n  public_subnet_tags = {\n    \"kubernetes.io/cluster/\u003ccluster_name\u003e\" = \"shared\"\n    \"kubernetes.io/role/elb\"               = \"1\"\n  }\n```\n\n### Private Subnet Tags\n\n```terraform\n  private_subnet_tags = {\n    \"kubernetes.io/cluster/\u003ccluster_name\u003e\" = \"shared\"\n    \"kubernetes.io/role/internal-elb\"      = \"1\"\n  }\n```\n\n## Automated checks\nCurrently the automated checks are limited. In CI the following checks are done for the root and each example.\n- lint: `terraform validate` and `terraform fmt`\n- basic init / get check: `terraform init -get -backend=false -input=false`\n\n## Generation variable documentation\nA markdown table for variables can be generated as follow. Generation requires awk and terraform-docs installed.\n\n```\n .ci/bin/terraform-docs.sh markdown .\n```\n\n## Philips Forest\n\nThis module is part of the Philips Forest.\n\n```\n                                                     ___                   _\n                                                    / __\\__  _ __ ___  ___| |_\n                                                   / _\\/ _ \\| '__/ _ \\/ __| __|\n                                                  / / | (_) | | |  __/\\__ \\ |_\n                                                  \\/   \\___/|_|  \\___||___/\\__|  \n\n                                                                 Infrastructure\n```\n\nTalk to the forestkeepers in the `forest`-channel on Slack.\n\n[![Slack](https://philips-software-slackin.now.sh/badge.svg)](https://philips-software-slackin.now.sh)\n[aws-eks-docs]: https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fterraform-aws-vpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips-software%2Fterraform-aws-vpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fterraform-aws-vpc/lists"}