Skip to content

Commit

Permalink
Merge pull request #1221 from erhancagirici/readd-region-to-tf-setup-…
Browse files Browse the repository at this point in the history
…configuration

Add region parameter back to TF setup.Configuration
  • Loading branch information
mbbush authored Mar 17, 2024
2 parents 3511b0f + dde32cd commit c04b0d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/clients/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

const (
keyAccountID = "account_id"
keyRegion = "region"
)

type SetupConfig struct {
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit c04b0d2

Please sign in to comment.