From ed14f67f158a8d2dde542dc35da6ff3d191fb149 Mon Sep 17 00:00:00 2001 From: Soren Martius Date: Fri, 8 Nov 2024 05:44:51 -0800 Subject: [PATCH] feat: add a new vpc --- stacks/terraform/demo/vpc/backend.tf | 11 +++++++++++ stacks/terraform/demo/vpc/main.tf | 18 ++++++++++++++++++ stacks/terraform/demo/vpc/stack.tm.hcl | 5 +++++ stacks/terraform/demo/vpc/terraform.tf | 16 ++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 stacks/terraform/demo/vpc/backend.tf create mode 100644 stacks/terraform/demo/vpc/main.tf create mode 100644 stacks/terraform/demo/vpc/stack.tm.hcl create mode 100644 stacks/terraform/demo/vpc/terraform.tf diff --git a/stacks/terraform/demo/vpc/backend.tf b/stacks/terraform/demo/vpc/backend.tf new file mode 100644 index 0000000..56a43ce --- /dev/null +++ b/stacks/terraform/demo/vpc/backend.tf @@ -0,0 +1,11 @@ +// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT + +terraform { + backend "s3" { + bucket = "terramate-example-terraform-state-backend" + dynamodb_table = "terraform-lock" + encrypt = true + key = "terraform/stacks/by-id/2528cc5e-53cd-4ad9-8452-cdf044b2c162/terraform.tfstate" + region = "us-east-1" + } +} diff --git a/stacks/terraform/demo/vpc/main.tf b/stacks/terraform/demo/vpc/main.tf new file mode 100644 index 0000000..3fe8b6b --- /dev/null +++ b/stacks/terraform/demo/vpc/main.tf @@ -0,0 +1,18 @@ +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + + name = "my-vpc" + cidr = "10.0.0.0/16" + + azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] + private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] + public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] + + enable_nat_gateway = true + enable_vpn_gateway = true + + tags = { + Terraform = "true" + Environment = "dev" + } +} diff --git a/stacks/terraform/demo/vpc/stack.tm.hcl b/stacks/terraform/demo/vpc/stack.tm.hcl new file mode 100644 index 0000000..ab7f7ca --- /dev/null +++ b/stacks/terraform/demo/vpc/stack.tm.hcl @@ -0,0 +1,5 @@ +stack { + name = "Demo VPC" + description = "Some demo VPC" + id = "2528cc5e-53cd-4ad9-8452-cdf044b2c162" +} diff --git a/stacks/terraform/demo/vpc/terraform.tf b/stacks/terraform/demo/vpc/terraform.tf new file mode 100644 index 0000000..30661b6 --- /dev/null +++ b/stacks/terraform/demo/vpc/terraform.tf @@ -0,0 +1,16 @@ +// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT + +terraform { + required_version = "1.8.5" +} +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.48" + } + } +} +provider "aws" { + region = "us-east-1" +}