How to get region for provider configuration under v0.13.0-beta3

Can you please tell me how to get the region of the provider?

My configuration:

provider "google" {
  project = "project"
  region  = "europe-west1"
}
...

In:

terraform --version
Terraform v0.12.25
+ provider.google v3.29.0

I have in planfile:

    "provider_config": {
      "google": {
        "name": "google",
        "expressions": {
          "credentials": {},
          "project": {
            "constant_value": "project"
          },
          "region": {
            "constant_value": "europe-west1"
          }
        }
      }
    }

But in:

Terraform v0.13.0-beta3
+ provider registry.terraform.io/hashicorp/google v3.29.0

In planfile we dont have provider_config setting only name:

    "provider_config": {
      "google": {
        "name": "google"
      }
    }

Thanks!

P.S. Sorry if it, not best place to ask such kind of question.)

Hi @vmotso!

I’ve split your question here off into its own topic because it seems like we’ll need to have a conversation about it that might otherwise create noise for those watching the beta thread.

I think you are talking about the output from the terraform show -json PLANFILE command. Is that right?

Hi @apparentlymart

Yes, you are right!

Why do I need a region? I’m building my tool to estimate the costs around terraform. Yes, I know that there are ready-made solutions, but I am now experimenting and generally believe that such experiments develop the community and the terraform ecosystem.
And it would be good to have meta-information about providers.

Hi @vmotso! This is definitely a bug; the output was not supposed to change so thank you for the question.

Thanks to you we got a fix in just in time for the next release, so you will see the expected output again once we release terraform v0.13.0-rc1: https://github.com/hashicorp/terraform/pull/25577

2 Likes