Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location set in bootstrap is ignored - resources still deployed in us-central1 and us-west1 #1172

Closed
mromascanu123 opened this issue Mar 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mromascanu123
Copy link

TL;DR

Deployed with default_region = "northamerica-northeast2" in 0-bootstrap / terraform.auto.tfvars. Despite this (too many to enumerate) resources still deployed in us-central1 and us-west1. This is caused by module defaults (set in variables.tf) not being overriden when modules invoked from above

Expected behavior

Everything should be deployed in the specified region (or regions). However in terraform.auto.tfvars in 0-bootstrap we can specify a single region - while the deployment by default we specify a single region. Should have the deployment deploy in a single region, or 2 regions based exclusively on what was specified in bootstrap

Observed behavior

Here are a few examples
image

Terraform Configuration

0-bootstrap / terraform.auto.tfvars
org_id = "946...etc" # format "000000000000"
billing_account = "01A5... etc" # format "000000-000000-000000"

... etc...
default_region = "northamerica-northeast2"

Terraform Version

[user@linuxbox ~]$ terraform version
Terraform v1.6.0
on linux_amd64

Additional information

Please fix region parameterization, having resources in multiple regions will make costs explode not to mention regulatory issues with data localization

@fmichaelobrien
Copy link
Contributor

fmichaelobrien commented Apr 3, 2024

reverify after pulling also a related fix in #1181

@fmichaelobrien
Copy link
Contributor

@fmichaelobrien
Copy link
Contributor

verify as well 3-networks-hub-and-spoke

https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/3-networks-hub-and-spoke/envs/shared/main.tf#L22

locals {
  env                = "common"
  environment_code   = "c"
  bgp_asn_number     = var.enable_partner_interconnect ? "16550" : "64514"
  dns_bgp_asn_number = var.enable_partner_interconnect ? "16550" : var.bgp_asn_dns
  default_region1    = "us-west1"
  default_region2    = "us-central1"

@eeaton
Copy link
Collaborator

eeaton commented May 29, 2024

#1181 is merged

@eeaton eeaton closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants