From db4fc4b7caafe36c633f7fcfcbd2257e424dbb39 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Fri, 28 Jan 2022 14:23:21 +0100 Subject: [PATCH] chore: Update CI and examples for Terraform (#1619) * chore: Update Ci and examples for Terraform - upgrade terraform versions - replaced philips vpc module by aws-terraform-vpc module - dropped support for terrform pre 1.x from examples * chore: Update Ci and examples for Terraform - upgrade terraform versions - replaced philips vpc module by aws-terraform-vpc module - dropped support for terrform pre 1.x from examples - upgrade terraform versions - replaced philips vpc module by aws-terraform-vpc module - dropped support for terrform pre 1.x from examples replace local by var ref * check formatting for latest terraform version * fix formatting * fix formatting * fix formatting --- .github/workflows/terraform.yml | 19 +++++++---- examples/arm64/main.tf | 2 +- examples/default/.terraform.lock.hcl | 28 +++++++-------- examples/default/versions.tf | 4 +-- examples/default/vpc.tf | 22 +++++++++--- examples/ephemeral/.terraform.lock.hcl | 28 +++++++-------- examples/ephemeral/versions.tf | 4 +-- examples/ephemeral/vpc.tf | 22 +++++++++--- examples/permissions-boundary/vpc.tf | 22 +++++++++--- examples/prebuilt/.terraform.lock.hcl | 29 ++++++++-------- examples/prebuilt/versions.tf | 4 +-- examples/prebuilt/vpc.tf | 22 +++++++++--- examples/ubuntu/.terraform.lock.hcl | 28 +++++++-------- examples/ubuntu/versions.tf | 15 ++++++++ examples/ubuntu/vpc.tf | 22 +++++++++--- examples/windows/.terraform.lock.hcl | 47 ++++++++++++++++++-------- examples/windows/versions.tf | 15 ++++++++ examples/windows/vpc.tf | 22 +++++++++--- 18 files changed, 246 insertions(+), 109 deletions(-) create mode 100644 examples/ubuntu/versions.tf create mode 100644 examples/windows/versions.tf diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 7df799ba61..ffbe29bea8 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -9,15 +9,13 @@ on: - "modules/*/lambdas/**" env: - tf_version: "1.0." - tf_working_dir: "." AWS_REGION: eu-west-1 jobs: verify_module: name: Verify module strategy: matrix: - terraform: [1.0.8] + terraform: [1.1.3, 'latest'] runs-on: ubuntu-latest container: image: hashicorp/terraform:${{ matrix.terraform }} @@ -31,7 +29,11 @@ jobs: touch modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/runner-binaries-syncer.zip - name: terraform init run: terraform init -get -backend=false -input=false - - name: check terraform formatting + - if: contains(matrix.terraform, '1.1.') + name: check terraform formatting + run: terraform fmt -recursive -check=true -write=false + - if: contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build + name: check terraform formatting run: terraform fmt -recursive -check=true -write=false continue-on-error: true - name: validate terraform @@ -42,7 +44,7 @@ jobs: strategy: fail-fast: false matrix: - terraform: [0.14.3, 0.15.5, 1.0.8] + terraform: [1.0.11, 1.1.3, 'latest'] example: ["default", "ubuntu", "prebuilt", "arm64", "ephemeral", "windows"] defaults: run: @@ -54,9 +56,12 @@ jobs: - uses: actions/checkout@v2 - name: terraform init run: terraform init -get -backend=false -input=false - - if: contains(matrix.terraform, '1.0.') + - if: contains(matrix.terraform, '1.1.') + name: check terraform formatting + run: terraform fmt -recursive -check=true -write=false + - if: contains(matrix.terraform, 'latest') # check formatting for the latest release but avoid failing the build name: check terraform formatting run: terraform fmt -recursive -check=true -write=false continue-on-error: true - - name: validate terraform + - name: validate terraform011 run: terraform validate diff --git a/examples/arm64/main.tf b/examples/arm64/main.tf index 8a728ebe3d..1ea26c9066 100644 --- a/examples/arm64/main.tf +++ b/examples/arm64/main.tf @@ -37,7 +37,7 @@ module "runners" { enable_organization_runners = false # Runners will automatically get the "arm64" label - runner_extra_labels = "default,example" + runner_extra_labels = "default,example" # enable access to the runners via SSM enable_ssm_on_runners = true diff --git a/examples/default/.terraform.lock.hcl b/examples/default/.terraform.lock.hcl index d940521fcb..118c1ffcdd 100644 --- a/examples/default/.terraform.lock.hcl +++ b/examples/default/.terraform.lock.hcl @@ -2,21 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "3.61.0" - constraints = ">= 3.27.0" + version = "3.71.0" + constraints = ">= 3.27.0, >= 3.38.0, >= 3.63.0" hashes = [ - "h1:fpZ14qQnn+uEOO2ZOlBFHgty48Ol8IOwd+ewxZ4z3zc=", - "zh:0483ca802ddb0ae4f73144b4357ba72242c6e2641aeb460b1aa9a6f6965464b0", - "zh:274712214ebeb0c1269cbc468e5705bb5741dc45b05c05e9793ca97f22a1baa1", - "zh:3c6bd97a2ca809469ae38f6893348386c476cb3065b120b785353c1507401adf", - "zh:53dd41a9aed9860adbbeeb71a23e4f8195c656fd15a02c90fa2d302a5f577d8c", - "zh:65c639c547b97bc880fd83e65511c0f4bbfc91b63cada3b8c0d5776444221700", - "zh:a2769e19137ff480c1dd3e4f248e832df90fb6930a22c66264d9793895161714", - "zh:a5897a99332cc0071e46a71359b86a8e53ab09c1453e94cd7cf45a0b577ff590", - "zh:bdc2353642d16d8e2437a9015cd4216a1772be9736645cc17d1a197480e2b5b7", - "zh:cbeace1deae938f6c0aca3734e6088f3633ca09611aff701c15cb6d42f2b918a", - "zh:d33ca19012aabd98cc03fdeccd0bd5ce56e28f61a1dfbb2eea88e89487de7fb3", - "zh:d548b29a864b0687e85e8a993f208e25e3ecc40fcc5b671e1985754b32fdd658", + "h1:5+M8SPZlb3FxcmAX4RykKzNrTHkpjoP1UpHcenOXcxo=", + "zh:173134d8861a33ed60a48942ad2b96b9d06e85c506d7f927bead47a28f4ebdd2", + "zh:2996c8e96930f526f1761e99d14c0b18d83e287b1362aa2fa1444cf848ece613", + "zh:43903da1e0a809a1fb5832e957dbe2321b86630d6bfdd8b47728647a72fd912d", + "zh:43e71fd8924e7f7b56a0b2a82e29edf07c53c2b41ee7bb442a2f1c27e03e86ae", + "zh:4f4c73711f64a3ff85f88bf6b2594e5431d996b7a59041ff6cbc352f069fc122", + "zh:5045241b8695ffbd0730bdcd91393b10ffd0cfbeaad6254036e42ead6687d8fd", + "zh:6a8811a0fb1035c09aebf1f9b15295523a9a7a2627fd783f50c6168a82e192dd", + "zh:8d273c04d7a8c36d4366329adf041c480a0f1be10a7269269c88413300aebdb8", + "zh:b90505897ae4943a74de2b88b6a9e7d97bf6dc325a0222235996580edff28656", + "zh:ea5e422942ac6fc958229d27d4381c89d21d70c5c2c67a6c06ff357bcded76f6", + "zh:f1536d7ff2d3bfd668e3ac33d8956b4f988f87fdfdcc371c7d94b98d5dba53e2", ] } diff --git a/examples/default/versions.tf b/examples/default/versions.tf index c96d0eee84..2fd30b34af 100644 --- a/examples/default/versions.tf +++ b/examples/default/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.27" + version = ">= 3.71" } local = { source = "hashicorp/local" @@ -11,5 +11,5 @@ terraform { source = "hashicorp/random" } } - required_version = ">= 0.14" + required_version = ">= 1" } diff --git a/examples/default/vpc.tf b/examples/default/vpc.tf index a7d21422f1..6b19a06b3f 100644 --- a/examples/default/vpc.tf +++ b/examples/default/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = local.aws_region - create_private_hosted_zone = false } diff --git a/examples/ephemeral/.terraform.lock.hcl b/examples/ephemeral/.terraform.lock.hcl index d940521fcb..d8cb243824 100644 --- a/examples/ephemeral/.terraform.lock.hcl +++ b/examples/ephemeral/.terraform.lock.hcl @@ -2,21 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "3.61.0" - constraints = ">= 3.27.0" + version = "3.71.0" + constraints = ">= 3.27.0, >= 3.38.0" hashes = [ - "h1:fpZ14qQnn+uEOO2ZOlBFHgty48Ol8IOwd+ewxZ4z3zc=", - "zh:0483ca802ddb0ae4f73144b4357ba72242c6e2641aeb460b1aa9a6f6965464b0", - "zh:274712214ebeb0c1269cbc468e5705bb5741dc45b05c05e9793ca97f22a1baa1", - "zh:3c6bd97a2ca809469ae38f6893348386c476cb3065b120b785353c1507401adf", - "zh:53dd41a9aed9860adbbeeb71a23e4f8195c656fd15a02c90fa2d302a5f577d8c", - "zh:65c639c547b97bc880fd83e65511c0f4bbfc91b63cada3b8c0d5776444221700", - "zh:a2769e19137ff480c1dd3e4f248e832df90fb6930a22c66264d9793895161714", - "zh:a5897a99332cc0071e46a71359b86a8e53ab09c1453e94cd7cf45a0b577ff590", - "zh:bdc2353642d16d8e2437a9015cd4216a1772be9736645cc17d1a197480e2b5b7", - "zh:cbeace1deae938f6c0aca3734e6088f3633ca09611aff701c15cb6d42f2b918a", - "zh:d33ca19012aabd98cc03fdeccd0bd5ce56e28f61a1dfbb2eea88e89487de7fb3", - "zh:d548b29a864b0687e85e8a993f208e25e3ecc40fcc5b671e1985754b32fdd658", + "h1:5+M8SPZlb3FxcmAX4RykKzNrTHkpjoP1UpHcenOXcxo=", + "zh:173134d8861a33ed60a48942ad2b96b9d06e85c506d7f927bead47a28f4ebdd2", + "zh:2996c8e96930f526f1761e99d14c0b18d83e287b1362aa2fa1444cf848ece613", + "zh:43903da1e0a809a1fb5832e957dbe2321b86630d6bfdd8b47728647a72fd912d", + "zh:43e71fd8924e7f7b56a0b2a82e29edf07c53c2b41ee7bb442a2f1c27e03e86ae", + "zh:4f4c73711f64a3ff85f88bf6b2594e5431d996b7a59041ff6cbc352f069fc122", + "zh:5045241b8695ffbd0730bdcd91393b10ffd0cfbeaad6254036e42ead6687d8fd", + "zh:6a8811a0fb1035c09aebf1f9b15295523a9a7a2627fd783f50c6168a82e192dd", + "zh:8d273c04d7a8c36d4366329adf041c480a0f1be10a7269269c88413300aebdb8", + "zh:b90505897ae4943a74de2b88b6a9e7d97bf6dc325a0222235996580edff28656", + "zh:ea5e422942ac6fc958229d27d4381c89d21d70c5c2c67a6c06ff357bcded76f6", + "zh:f1536d7ff2d3bfd668e3ac33d8956b4f988f87fdfdcc371c7d94b98d5dba53e2", ] } diff --git a/examples/ephemeral/versions.tf b/examples/ephemeral/versions.tf index c96d0eee84..2fd30b34af 100644 --- a/examples/ephemeral/versions.tf +++ b/examples/ephemeral/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.27" + version = ">= 3.71" } local = { source = "hashicorp/local" @@ -11,5 +11,5 @@ terraform { source = "hashicorp/random" } } - required_version = ">= 0.14" + required_version = ">= 1" } diff --git a/examples/ephemeral/vpc.tf b/examples/ephemeral/vpc.tf index a7d21422f1..6b19a06b3f 100644 --- a/examples/ephemeral/vpc.tf +++ b/examples/ephemeral/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = local.aws_region - create_private_hosted_zone = false } diff --git a/examples/permissions-boundary/vpc.tf b/examples/permissions-boundary/vpc.tf index 21c4778677..6b19a06b3f 100644 --- a/examples/permissions-boundary/vpc.tf +++ b/examples/permissions-boundary/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.1.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = local.aws_region - create_private_hosted_zone = false } diff --git a/examples/prebuilt/.terraform.lock.hcl b/examples/prebuilt/.terraform.lock.hcl index ba82aa4f3a..e244ce40ee 100644 --- a/examples/prebuilt/.terraform.lock.hcl +++ b/examples/prebuilt/.terraform.lock.hcl @@ -2,22 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "3.61.0" - constraints = ">= 3.27.0, >= 3.38.0" + version = "3.71.0" + constraints = ">= 3.38.0, >= 3.63.0, >= 3.71.0" hashes = [ - "h1:YZaozdn4J1Ax01NkubRAdv809vlpJOXRBC4KsqBzpvA=", - "h1:fpZ14qQnn+uEOO2ZOlBFHgty48Ol8IOwd+ewxZ4z3zc=", - "zh:0483ca802ddb0ae4f73144b4357ba72242c6e2641aeb460b1aa9a6f6965464b0", - "zh:274712214ebeb0c1269cbc468e5705bb5741dc45b05c05e9793ca97f22a1baa1", - "zh:3c6bd97a2ca809469ae38f6893348386c476cb3065b120b785353c1507401adf", - "zh:53dd41a9aed9860adbbeeb71a23e4f8195c656fd15a02c90fa2d302a5f577d8c", - "zh:65c639c547b97bc880fd83e65511c0f4bbfc91b63cada3b8c0d5776444221700", - "zh:a2769e19137ff480c1dd3e4f248e832df90fb6930a22c66264d9793895161714", - "zh:a5897a99332cc0071e46a71359b86a8e53ab09c1453e94cd7cf45a0b577ff590", - "zh:bdc2353642d16d8e2437a9015cd4216a1772be9736645cc17d1a197480e2b5b7", - "zh:cbeace1deae938f6c0aca3734e6088f3633ca09611aff701c15cb6d42f2b918a", - "zh:d33ca19012aabd98cc03fdeccd0bd5ce56e28f61a1dfbb2eea88e89487de7fb3", - "zh:d548b29a864b0687e85e8a993f208e25e3ecc40fcc5b671e1985754b32fdd658", + "h1:5+M8SPZlb3FxcmAX4RykKzNrTHkpjoP1UpHcenOXcxo=", + "zh:173134d8861a33ed60a48942ad2b96b9d06e85c506d7f927bead47a28f4ebdd2", + "zh:2996c8e96930f526f1761e99d14c0b18d83e287b1362aa2fa1444cf848ece613", + "zh:43903da1e0a809a1fb5832e957dbe2321b86630d6bfdd8b47728647a72fd912d", + "zh:43e71fd8924e7f7b56a0b2a82e29edf07c53c2b41ee7bb442a2f1c27e03e86ae", + "zh:4f4c73711f64a3ff85f88bf6b2594e5431d996b7a59041ff6cbc352f069fc122", + "zh:5045241b8695ffbd0730bdcd91393b10ffd0cfbeaad6254036e42ead6687d8fd", + "zh:6a8811a0fb1035c09aebf1f9b15295523a9a7a2627fd783f50c6168a82e192dd", + "zh:8d273c04d7a8c36d4366329adf041c480a0f1be10a7269269c88413300aebdb8", + "zh:b90505897ae4943a74de2b88b6a9e7d97bf6dc325a0222235996580edff28656", + "zh:ea5e422942ac6fc958229d27d4381c89d21d70c5c2c67a6c06ff357bcded76f6", + "zh:f1536d7ff2d3bfd668e3ac33d8956b4f988f87fdfdcc371c7d94b98d5dba53e2", ] } diff --git a/examples/prebuilt/versions.tf b/examples/prebuilt/versions.tf index c96d0eee84..2fd30b34af 100644 --- a/examples/prebuilt/versions.tf +++ b/examples/prebuilt/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3.27" + version = ">= 3.71" } local = { source = "hashicorp/local" @@ -11,5 +11,5 @@ terraform { source = "hashicorp/random" } } - required_version = ">= 0.14" + required_version = ">= 1" } diff --git a/examples/prebuilt/vpc.tf b/examples/prebuilt/vpc.tf index 1ac37cb4c8..5bdde2171e 100644 --- a/examples/prebuilt/vpc.tf +++ b/examples/prebuilt/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${var.aws_region}a", "${var.aws_region}b", "${var.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = var.aws_region - create_private_hosted_zone = false } diff --git a/examples/ubuntu/.terraform.lock.hcl b/examples/ubuntu/.terraform.lock.hcl index 73993197ac..701f2a0b55 100644 --- a/examples/ubuntu/.terraform.lock.hcl +++ b/examples/ubuntu/.terraform.lock.hcl @@ -2,21 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "3.61.0" - constraints = ">= 3.27.0, >= 3.38.0" + version = "3.71.0" + constraints = ">= 3.38.0, >= 3.63.0, >= 3.71.0" hashes = [ - "h1:fpZ14qQnn+uEOO2ZOlBFHgty48Ol8IOwd+ewxZ4z3zc=", - "zh:0483ca802ddb0ae4f73144b4357ba72242c6e2641aeb460b1aa9a6f6965464b0", - "zh:274712214ebeb0c1269cbc468e5705bb5741dc45b05c05e9793ca97f22a1baa1", - "zh:3c6bd97a2ca809469ae38f6893348386c476cb3065b120b785353c1507401adf", - "zh:53dd41a9aed9860adbbeeb71a23e4f8195c656fd15a02c90fa2d302a5f577d8c", - "zh:65c639c547b97bc880fd83e65511c0f4bbfc91b63cada3b8c0d5776444221700", - "zh:a2769e19137ff480c1dd3e4f248e832df90fb6930a22c66264d9793895161714", - "zh:a5897a99332cc0071e46a71359b86a8e53ab09c1453e94cd7cf45a0b577ff590", - "zh:bdc2353642d16d8e2437a9015cd4216a1772be9736645cc17d1a197480e2b5b7", - "zh:cbeace1deae938f6c0aca3734e6088f3633ca09611aff701c15cb6d42f2b918a", - "zh:d33ca19012aabd98cc03fdeccd0bd5ce56e28f61a1dfbb2eea88e89487de7fb3", - "zh:d548b29a864b0687e85e8a993f208e25e3ecc40fcc5b671e1985754b32fdd658", + "h1:5+M8SPZlb3FxcmAX4RykKzNrTHkpjoP1UpHcenOXcxo=", + "zh:173134d8861a33ed60a48942ad2b96b9d06e85c506d7f927bead47a28f4ebdd2", + "zh:2996c8e96930f526f1761e99d14c0b18d83e287b1362aa2fa1444cf848ece613", + "zh:43903da1e0a809a1fb5832e957dbe2321b86630d6bfdd8b47728647a72fd912d", + "zh:43e71fd8924e7f7b56a0b2a82e29edf07c53c2b41ee7bb442a2f1c27e03e86ae", + "zh:4f4c73711f64a3ff85f88bf6b2594e5431d996b7a59041ff6cbc352f069fc122", + "zh:5045241b8695ffbd0730bdcd91393b10ffd0cfbeaad6254036e42ead6687d8fd", + "zh:6a8811a0fb1035c09aebf1f9b15295523a9a7a2627fd783f50c6168a82e192dd", + "zh:8d273c04d7a8c36d4366329adf041c480a0f1be10a7269269c88413300aebdb8", + "zh:b90505897ae4943a74de2b88b6a9e7d97bf6dc325a0222235996580edff28656", + "zh:ea5e422942ac6fc958229d27d4381c89d21d70c5c2c67a6c06ff357bcded76f6", + "zh:f1536d7ff2d3bfd668e3ac33d8956b4f988f87fdfdcc371c7d94b98d5dba53e2", ] } diff --git a/examples/ubuntu/versions.tf b/examples/ubuntu/versions.tf new file mode 100644 index 0000000000..2fd30b34af --- /dev/null +++ b/examples/ubuntu/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3.71" + } + local = { + source = "hashicorp/local" + } + random = { + source = "hashicorp/random" + } + } + required_version = ">= 1" +} diff --git a/examples/ubuntu/vpc.tf b/examples/ubuntu/vpc.tf index a7d21422f1..6b19a06b3f 100644 --- a/examples/ubuntu/vpc.tf +++ b/examples/ubuntu/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = local.aws_region - create_private_hosted_zone = false } diff --git a/examples/windows/.terraform.lock.hcl b/examples/windows/.terraform.lock.hcl index 9a3138e033..37bd315f51 100644 --- a/examples/windows/.terraform.lock.hcl +++ b/examples/windows/.terraform.lock.hcl @@ -2,21 +2,39 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "3.68.0" - constraints = ">= 3.38.0" + version = "3.71.0" + constraints = ">= 3.38.0, >= 3.63.0, >= 3.71.0" hashes = [ - "h1:w546dMDYshe7eeOsxSZt7ihMJOKCbl/7ifZ9lI1PUAY=", - "zh:05a43a7dbd409451c08a958610234619d7e0d102e601220b60aad025bf2b6e2c", - "zh:0d195fa738a348e511550de39caec3f10cfb9afe8d69ed2104b39e9129438739", - "zh:3d88a19b2a810559bc6953fe92b7a7c6e3251c5501866c94ef34648df3fdf461", - "zh:3e42fdaf9df636a3741871c4209c9665549d67f07a69dd8700dcdcd43cd367fb", - "zh:690418e0969eb36807832b48099f09e686e3d0fda42f483efc835bdef6363888", - "zh:7158d5ef79dc90f2da61b6bc28d450e8d61a58b314d9abed8a03a09b80a41316", - "zh:7ed4fac5d8de0141559fc4dbf97dd754d5af8c245a946d955b11530293f6f4d6", - "zh:d0961612800f75321014347b69148e2f326d8b9ff2a9ac99074d35ee3f289d17", - "zh:e8d35599fc8f7ca796ada775828f1dbf10668e0c7eb1f052330360eb8a2f83e3", - "zh:e989ac0324fd9d443da317b3d97ec9fb8c8122fa2951ac2356302891a20bb595", - "zh:ff135b9cac355ecd8f69a64206751503fa9aa41147241c9f99ad766f27a6dcd3", + "h1:5+M8SPZlb3FxcmAX4RykKzNrTHkpjoP1UpHcenOXcxo=", + "zh:173134d8861a33ed60a48942ad2b96b9d06e85c506d7f927bead47a28f4ebdd2", + "zh:2996c8e96930f526f1761e99d14c0b18d83e287b1362aa2fa1444cf848ece613", + "zh:43903da1e0a809a1fb5832e957dbe2321b86630d6bfdd8b47728647a72fd912d", + "zh:43e71fd8924e7f7b56a0b2a82e29edf07c53c2b41ee7bb442a2f1c27e03e86ae", + "zh:4f4c73711f64a3ff85f88bf6b2594e5431d996b7a59041ff6cbc352f069fc122", + "zh:5045241b8695ffbd0730bdcd91393b10ffd0cfbeaad6254036e42ead6687d8fd", + "zh:6a8811a0fb1035c09aebf1f9b15295523a9a7a2627fd783f50c6168a82e192dd", + "zh:8d273c04d7a8c36d4366329adf041c480a0f1be10a7269269c88413300aebdb8", + "zh:b90505897ae4943a74de2b88b6a9e7d97bf6dc325a0222235996580edff28656", + "zh:ea5e422942ac6fc958229d27d4381c89d21d70c5c2c67a6c06ff357bcded76f6", + "zh:f1536d7ff2d3bfd668e3ac33d8956b4f988f87fdfdcc371c7d94b98d5dba53e2", + ] +} + +provider "registry.terraform.io/hashicorp/local" { + version = "2.1.0" + hashes = [ + "h1:KfieWtVyGWwplSoLIB5usKAUnrIkDQBkWaR5TI+4WYg=", + "zh:0f1ec65101fa35050978d483d6e8916664b7556800348456ff3d09454ac1eae2", + "zh:36e42ac19f5d68467aacf07e6adcf83c7486f2e5b5f4339e9671f68525fc87ab", + "zh:6db9db2a1819e77b1642ec3b5e95042b202aee8151a0256d289f2e141bf3ceb3", + "zh:719dfd97bb9ddce99f7d741260b8ece2682b363735c764cac83303f02386075a", + "zh:7598bb86e0378fd97eaa04638c1a4c75f960f62f69d3662e6d80ffa5a89847fe", + "zh:ad0a188b52517fec9eca393f1e2c9daea362b33ae2eb38a857b6b09949a727c1", + "zh:c46846c8df66a13fee6eff7dc5d528a7f868ae0dcf92d79deaac73cc297ed20c", + "zh:dc1a20a2eec12095d04bf6da5321f535351a594a636912361db20eb2a707ccc4", + "zh:e57ab4771a9d999401f6badd8b018558357d3cbdf3d33cc0c4f83e818ca8e94b", + "zh:ebdcde208072b4b0f8d305ebf2bfdc62c926e0717599dcf8ec2fd8c5845031c3", + "zh:ef34c52b68933bedd0868a13ccfd59ff1c820f299760b3c02e008dc95e2ece91", ] } @@ -24,6 +42,7 @@ provider "registry.terraform.io/hashicorp/random" { version = "3.1.0" hashes = [ "h1:EPIax4Ftp2SNdB9pUfoSjxoueDoLc/Ck3EUoeX0Dvsg=", + "h1:rKYu5ZUbXwrLG1w81k7H3nce/Ys6yAxXhWcbtk36HjY=", "zh:2bbb3339f0643b5daa07480ef4397bd23a79963cc364cdfbb4e86354cb7725bc", "zh:3cd456047805bf639fbf2c761b1848880ea703a054f76db51852008b11008626", "zh:4f251b0eda5bb5e3dc26ea4400dba200018213654b69b4a5f96abee815b4f5ff", diff --git a/examples/windows/versions.tf b/examples/windows/versions.tf new file mode 100644 index 0000000000..2fd30b34af --- /dev/null +++ b/examples/windows/versions.tf @@ -0,0 +1,15 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3.71" + } + local = { + source = "hashicorp/local" + } + random = { + source = "hashicorp/random" + } + } + required_version = ">= 1" +} diff --git a/examples/windows/vpc.tf b/examples/windows/vpc.tf index a7d21422f1..6b19a06b3f 100644 --- a/examples/windows/vpc.tf +++ b/examples/windows/vpc.tf @@ -1,7 +1,21 @@ module "vpc" { - source = "git::https://github.com/philips-software/terraform-aws-vpc.git?ref=2.2.0" + source = "terraform-aws-modules/vpc/aws" + version = "3.11.2" + + name = "vpc-${local.environment}" + cidr = "10.0.0.0/16" + + azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"] + 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_dns_hostnames = true + enable_nat_gateway = true + map_public_ip_on_launch = false + single_nat_gateway = true + + tags = { + Environment = local.environment + } - environment = local.environment - aws_region = local.aws_region - create_private_hosted_zone = false }