From 4780a98f46c1a87d1581204d83ca3402c7d708d2 Mon Sep 17 00:00:00 2001 From: Alaric Hartmann Date: Fri, 6 Dec 2024 16:08:17 -0500 Subject: [PATCH] docs: update provider versions and fix transit gateway ID references in multi-region and simple examples --- examples/multi-region/main.tf | 26 ++++++++++++++++++++------ examples/simple/main.tf | 21 ++++++++++++++++----- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/examples/multi-region/main.tf b/examples/multi-region/main.tf index d2a8591..8406432 100644 --- a/examples/multi-region/main.tf +++ b/examples/multi-region/main.tf @@ -13,16 +13,31 @@ * */ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "6.12.0" + } + google-beta = { + source = "hashicorp/google-beta" + version = "6.12.0" + } + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + provider "google" { project = "project" region = "us-central1" - version = "3.11.0" } provider "google-beta" { project = "project" region = "us-central1" - version = "3.13.0" } provider "google" { @@ -50,8 +65,7 @@ provider "google-beta" { } provider "aws" { - region = "us-east-1" - version = "2.51.0" + region = "us-east-1" } # N. Virginia / USA @@ -87,7 +101,7 @@ module "tgw-us-east-1" { module "cb-us-east-1" { source = "github.com/spotify/terraform-google-aws-hybrid-cloud-vpn" - transit_gateway_id = module.tgw-us-east-1.this_ec2_transit_gateway_id + transit_gateway_id = module.tgw-us-east-1.ec2_transit_gateway_id google_network = "default" amazon_side_asn = 64512 google_side_asn = 65534 @@ -126,7 +140,7 @@ module "tgw-eu-central-1" { } module "cb-eu-central-1" { source = "github.com/spotify/terraform-google-aws-hybrid-cloud-vpn" - transit_gateway_id = module.tgw-eu-central-1.this_ec2_transit_gateway_id + transit_gateway_id = module.tgw-eu-central-1.ec2_transit_gateway_id google_network = "default" amazon_side_asn = 64513 google_side_asn = 65533 diff --git a/examples/simple/main.tf b/examples/simple/main.tf index a93a2ed..0b8bf79 100644 --- a/examples/simple/main.tf +++ b/examples/simple/main.tf @@ -10,20 +10,31 @@ * */ +terraform { + required_providers { + google-beta = { + source = "hashicorp/google-beta" + version = "6.12.0" + } + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + provider "google-beta" { project = "project" region = "us-central1" - version = "3.11.0" } provider "aws" { - region = "us-east-1" - version = "2.51.0" + region = "us-east-1" } module "tgw-us-east-1" { source = "terraform-aws-modules/transit-gateway/aws" - version = "1.1.0" + version = "2.12.2" name = "tgw-example-us-east-1" description = "TGW example shared with several other AWS accounts" amazon_side_asn = "64512" @@ -38,7 +49,7 @@ module "tgw-us-east-1" { module "cb-us-east-1" { source = "github.com/spotify/terraform-google-aws-hybrid-cloud-vpn" - transit_gateway_id = module.tgw-us-east-1.this_ec2_transit_gateway_id + transit_gateway_id = module.tgw-us-east-1.ec2_transit_gateway_id google_network = default amazon_side_asn = 64512 google_side_asn = 65534