{"id":4735,"date":"2025-12-02T12:24:38","date_gmt":"2025-12-02T12:24:38","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=4735"},"modified":"2025-12-02T12:24:38","modified_gmt":"2025-12-02T12:24:38","slug":"simple-vpc-deployment-pattern-terraform","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=4735","title":{"rendered":"Simple VPC Deployment Pattern (Terraform)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A simple VPC deployment pattern which includes a simple configuration that has been tested and can be used to build a new infrastructure from. It uses Terraform and uses local state storage (within a directory called &#8220;state_data&#8221;), for production uses it is mandated to use some form of remote state storage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The pattern within the template includes the following infrastructure components, it is set to use the eu-west-2 (London) region, it is highly available and components are spread over two availability zones.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The EC2 instances within the private subnets (A, B, C and D) are able to communicate with each other across their subnets, however they can only reach the Internet via the NATGW (in Public Subnet A and B), there is no inbound access (from the Internet) permitted.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VPC<\/li>\n\n\n\n<li>IGW (Internet Gateway)<\/li>\n\n\n\n<li>2 x NATGW (NAT Gateways) in Availablity Zone A and B<\/li>\n\n\n\n<li>2 x EIP (Elastic IP Addresses v4) attached to NATGWs<\/li>\n\n\n\n<li>6 x Subnets\n<ul class=\"wp-block-list\">\n<li>2 x Public Subnets (A &amp; B)<\/li>\n\n\n\n<li>2 x Private Subnets (A &amp; B) with EC2 Instance A and EC2 Instance B<\/li>\n\n\n\n<li>2 x Private Subnets (C &amp; D) with EC2 Instance C and EC2 Instance D<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>6 x Route Tables (one per Subnet)<\/li>\n\n\n\n<li>IAM Role(s) and SSM Configuration<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/tristanhself\/general\/tree\/master\/aws\/vpc-subnets-nat-igw\">https:\/\/github.com\/tristanhself\/general\/tree\/master\/aws\/vpc-subnets-nat-igw<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A simple VPC deployment pattern which includes a simple configuration that has been tested and can be used to build a new infrastructure from. It uses Terraform and uses local state storage (within a directory called &#8220;state_data&#8221;), for production uses it is mandated to use some form of remote state storage. The pattern within the &#8230; <a title=\"Simple VPC Deployment Pattern (Terraform)\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=4735\" aria-label=\"Read more about Simple VPC Deployment Pattern (Terraform)\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,45],"tags":[],"class_list":["post-4735","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-terraform"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4735"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4735\/revisions"}],"predecessor-version":[{"id":4736,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4735\/revisions\/4736"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4335"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}