From d2cd78975eb9ffc8afe9490e5d1c571b21021ccd Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 31 May 2022 22:25:05 +0100 Subject: [PATCH] fix: add all regions to aws examples --- examples/templates/aws-linux/main.tf | 22 +++++++++++++++++++++- examples/templates/aws-windows/main.tf | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index d6eb41a2da6ac..30cbbbb94aa8a 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -27,11 +27,31 @@ EOT sensitive = true } +# Last updated 2022-05-31 +# aws ec2 describe-regions | jq -r '[.Regions[].RegionName] | sort' variable "region" { description = "What region should your workspace live in?" default = "us-east-1" validation { - condition = contains(["us-east-1", "us-east-2", "us-west-1", "us-west-2"], var.region) + condition = contains([ + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2" + ], var.region) error_message = "Invalid region!" } } diff --git a/examples/templates/aws-windows/main.tf b/examples/templates/aws-windows/main.tf index d8b6d3dbf94fd..4300e326d523b 100644 --- a/examples/templates/aws-windows/main.tf +++ b/examples/templates/aws-windows/main.tf @@ -24,11 +24,31 @@ EOT sensitive = true } +# Last updated 2022-05-31 +# aws ec2 describe-regions | jq -r '[.Regions[].RegionName] | sort' variable "region" { description = "What region should your workspace live in?" default = "us-east-1" validation { - condition = contains(["us-east-1", "us-east-2", "us-west-1", "us-west-2"], var.region) + condition = contains([ + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2" + ], var.region) error_message = "Invalid region!" } }