From 54ca703763c5563053ca21338b2effd2275e6781 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 4 Dec 2020 15:19:12 -0500 Subject: [PATCH] tests/resource/workspaces_directory: Fix hardcoded region --- aws/resource_aws_workspaces_directory_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_workspaces_directory_test.go b/aws/resource_aws_workspaces_directory_test.go index 0b4f927003a..611db1c799d 100644 --- a/aws/resource_aws_workspaces_directory_test.go +++ b/aws/resource_aws_workspaces_directory_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/workspaces" multierror "github.com/hashicorp/go-multierror" @@ -515,7 +516,7 @@ data "aws_availability_zones" "available" { locals { region_workspaces_az_ids = { - "us-east-1" = formatlist("use1-az%%d", [2, 4, 6]) + %q = formatlist("use1-az%%d", [2, 4, 6]) } workspaces_az_ids = lookup(local.region_workspaces_az_ids, data.aws_region.current.name, data.aws_availability_zones.available.zone_ids) @@ -563,7 +564,7 @@ resource "aws_directory_service_directory" "main" { Name = "tf-testacc-workspaces-directory-%[1]s" } } -`, rName) +`, rName, endpoints.UsEast1RegionID) } func testAccWorkspacesDirectoryConfig(rName string) string {