From 5f7debe9fbdb3a5a15008995a50153c853a58577 Mon Sep 17 00:00:00 2001 From: Erhan Cagirici Date: Sat, 16 Mar 2024 11:23:02 +0300 Subject: [PATCH] Add region parameter back to TF setup.Configuration Signed-off-by: Erhan Cagirici (cherry picked from commit dde32cdb6621dac132e4222ac5daed2a879f1614) --- internal/clients/aws.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/clients/aws.go b/internal/clients/aws.go index e7fdbe9da6..13fa90b9ab 100644 --- a/internal/clients/aws.go +++ b/internal/clients/aws.go @@ -25,6 +25,7 @@ import ( const ( keyAccountID = "account_id" + keyRegion = "region" ) type SetupConfig struct { @@ -64,6 +65,10 @@ func SelectTerraformSetup(config *SetupConfig) terraform.SetupFn { // nolint:goc ps.ClientMetadata = map[string]string{ keyAccountID: account, } + // several external name configs depend on the setup.Configuration for templating region + ps.Configuration = map[string]any{ + keyRegion: awsCfg.Region, + } if config.TerraformProvider == nil { return terraform.Setup{}, errors.New("terraform provider cannot be nil") }