hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.32k stars 1.72k forks source link

data google_project incorrectly sets project number as project id #19732

Open wparr-circle opened 1 week ago

wparr-circle commented 1 week ago

Community Note

Terraform Version & Provider Version(s)

Terraform v1.9.7 on arm64

Affected Resource(s)

google_project

Terraform Configuration

provider "google" {
  project = "123456789123"
}

data "google_project" "main" {}

output "project_id" {
  value = data.google_project.main.project_id
}

Debug Output

2024-10-03T10:49:11.336+0100 [INFO]  Terraform version: 1.9.7
2024-10-03T10:49:11.336+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.58.0
2024-10-03T10:49:11.336+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0
2024-10-03T10:49:11.336+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-10-03T10:49:11.336+0100 [DEBUG] using github.com/zclconf/go-cty v1.14.4
2024-10-03T10:49:11.336+0100 [INFO]  Go runtime version: go1.22.7
2024-10-03T10:49:11.336+0100 [INFO]  CLI args: []string{"terraform", "plan"}
2024-10-03T10:49:11.336+0100 [DEBUG] Attempting to open CLI config file: /Users/redacted/.terraformrc
2024-10-03T10:49:11.336+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-10-03T10:49:11.337+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-10-03T10:49:11.337+0100 [DEBUG] ignoring non-existing provider search directory /Users/redacted/.terraform.d/plugins
2024-10-03T10:49:11.337+0100 [DEBUG] ignoring non-existing provider search directory /Users/redacted/Library/Application Support/io.terraform/plugins
2024-10-03T10:49:11.337+0100 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2024-10-03T10:49:11.337+0100 [INFO]  CLI command args: []string{"plan"}
2024-10-03T10:49:11.403+0100 [DEBUG] checking for provisioner in "."
2024-10-03T10:49:11.403+0100 [DEBUG] checking for provisioner in "/Users/redacted/bin"
2024-10-03T10:49:11.404+0100 [INFO]  backend/local: starting Plan operation
2024-10-03T10:49:11.405+0100 [DEBUG] created provider logger: level=debug
2024-10-03T10:49:11.405+0100 [INFO]  provider: configuring client automatic mTLS
2024-10-03T10:49:11.411+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5"]
2024-10-03T10:49:11.415+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 pid=40689
2024-10-03T10:49:11.415+0100 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:11.727+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: configuring server automatic mTLS: timestamp="2024-10-03T10:49:11.727+0100"
2024-10-03T10:49:11.733+0100 [DEBUG] provider: using plugin: version=5
2024-10-03T10:49:11.733+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: plugin address: address=/var/folders/tx/b1z_73dd6ljfk1bth17l3dn00000gn/T/plugin4126065091 network=unix timestamp="2024-10-03T10:49:11.733+0100"
2024-10-03T10:49:11.834+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-10-03T10:49:11.835+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 id=40689
2024-10-03T10:49:11.838+0100 [DEBUG] provider: plugin exited
2024-10-03T10:49:11.838+0100 [DEBUG] Building and walking validate graph
2024-10-03T10:49:11.839+0100 [DEBUG] ProviderTransformer: "data.google_project.main" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/google"]
2024-10-03T10:49:11.839+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2024-10-03T10:49:11.839+0100 [DEBUG] ReferenceTransformer: "data.google_project.main" references: []
2024-10-03T10:49:11.839+0100 [DEBUG] ReferenceTransformer: "output.project_id (expand)" references: [data.google_project.main]
2024-10-03T10:49:11.839+0100 [DEBUG] Starting graph walk: walkValidate
2024-10-03T10:49:11.839+0100 [DEBUG] created provider logger: level=debug
2024-10-03T10:49:11.840+0100 [INFO]  provider: configuring client automatic mTLS
2024-10-03T10:49:11.842+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5"]
2024-10-03T10:49:11.846+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 pid=40690
2024-10-03T10:49:11.846+0100 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:12.134+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: configuring server automatic mTLS: timestamp="2024-10-03T10:49:12.134+0100"
2024-10-03T10:49:12.140+0100 [DEBUG] provider: using plugin: version=5
2024-10-03T10:49:12.140+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: plugin address: address=/var/folders/tx/b1z_73dd6ljfk1bth17l3dn00000gn/T/plugin2235102223 network=unix timestamp="2024-10-03T10:49:12.140+0100"
2024-10-03T10:49:12.163+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-10-03T10:49:12.164+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 id=40690
2024-10-03T10:49:12.165+0100 [DEBUG] provider: plugin exited
2024-10-03T10:49:12.166+0100 [INFO]  backend/local: plan calling Plan
2024-10-03T10:49:12.166+0100 [DEBUG] Building and walking plan graph for NormalMode
2024-10-03T10:49:12.166+0100 [DEBUG] ProviderTransformer: "data.google_project.main (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/google"]
2024-10-03T10:49:12.166+0100 [DEBUG] ReferenceTransformer: "output.project_id (expand)" references: [data.google_project.main (expand)]
2024-10-03T10:49:12.166+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2024-10-03T10:49:12.166+0100 [DEBUG] ReferenceTransformer: "data.google_project.main (expand)" references: []
2024-10-03T10:49:12.166+0100 [DEBUG] Starting graph walk: walkPlan
2024-10-03T10:49:12.166+0100 [DEBUG] created provider logger: level=debug
2024-10-03T10:49:12.166+0100 [INFO]  provider: configuring client automatic mTLS
2024-10-03T10:49:12.168+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5"]
2024-10-03T10:49:12.172+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 pid=40691
2024-10-03T10:49:12.172+0100 [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:12.463+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: configuring server automatic mTLS: timestamp="2024-10-03T10:49:12.463+0100"
2024-10-03T10:49:12.468+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: plugin address: address=/var/folders/tx/b1z_73dd6ljfk1bth17l3dn00000gn/T/plugin2936043557 network=unix timestamp="2024-10-03T10:49:12.468+0100"
2024-10-03T10:49:12.468+0100 [DEBUG] provider: using plugin: version=5
2024-10-03T10:49:12.492+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: Authenticating using DefaultClient...: tf_req_id=02a6fb41-bfbb-c728-0623-5d0a14afb927 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1857 @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_mux_provider="*proto5server.Server" timestamp="2024-10-03T10:49:12.492+0100"
2024-10-03T10:49:12.492+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=02a6fb41-bfbb-c728-0623-5d0a14afb927 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1858 @module=google timestamp="2024-10-03T10:49:12.492+0100"
2024-10-03T10:49:12.492+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: Authenticating using DefaultClient...: tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider @module=google tf_req_id=02a6fb41-bfbb-c728-0623-5d0a14afb927 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1857 timestamp="2024-10-03T10:49:12.492+0100"
2024-10-03T10:49:12.492+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: @module=google tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider tf_req_id=02a6fb41-bfbb-c728-0623-5d0a14afb927 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1858 timestamp="2024-10-03T10:49:12.492+0100"
2024-10-03T10:49:12.492+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [DEBUG] Waiting for state to become: [success]
2024-10-03T10:49:12.970+0100 [INFO]  provider.terraform-provider-google_v6.5.0_x5: Terraform is using this identity: redacted: @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=02a6fb41-bfbb-c728-0623-5d0a14afb927 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1727 tf_mux_provider="*proto5server.Server" tf_rpc=ConfigureProvider timestamp="2024-10-03T10:49:12.970+0100"
2024-10-03T10:49:12.973+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [INFO] Authenticating using DefaultClient...
2024-10-03T10:49:12.974+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2024-10-03T10:49:12.974+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [INFO] Authenticating using DefaultClient...
2024-10-03T10:49:12.974+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2024-10-03T10:49:12.974+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:12 [DEBUG] Waiting for state to become: [success]
2024-10-03T10:49:13.175+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [INFO] Terraform is using this identity: redacted
2024-10-03T10:49:13.175+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] parent context canceled, cleaning up batcher batches
2024-10-03T10:49:13.175+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Stopping batcher "Service Usage"
2024-10-03T10:49:13.175+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] parent context canceled, cleaning up batcher batches
2024-10-03T10:49:13.175+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Stopping batcher "IAM"
2024-10-03T10:49:13.175+0100 [DEBUG] Resource instance state not found for node "data.google_project.main", instance data.google_project.main
2024-10-03T10:49:13.176+0100 [DEBUG] ReferenceTransformer: "data.google_project.main" references: []
2024-10-03T10:49:13.178+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Waiting for state to become: [success]
2024-10-03T10:49:13.178+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [INFO] Instantiating Google Cloud ResourceManager client for path https://cloudresourcemanager.googleapis.com/
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: starting RoundTrip retry loop
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: request attempt 0
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Google API Request Details:
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: ---[ REQUEST ]---------------------------------------
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: GET /v1/projects/123456789123?alt=json&prettyPrint=false HTTP/1.1
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Host: cloudresourcemanager.googleapis.com
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: User-Agent: google-api-go-client/0.5 Terraform/1.9.7 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google/6.5.0
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Goog-Api-Client: gl-go/1.21.13 gdcl/0.193.0
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Accept-Encoding: gzip
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.179+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: -----------------------------------------------------
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Google API Response Details:
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: ---[ RESPONSE ]--------------------------------------
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: HTTP/2.0 200 OK
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Cache-Control: private
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Content-Type: application/json; charset=UTF-8
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Date: Thu, 03 Oct 2024 09:49:13 GMT
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Server: ESF
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Server-Timing: gfet4t7; dur=197
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: Origin
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: X-Origin
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: Referer
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Content-Type-Options: nosniff
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Frame-Options: SAMEORIGIN
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Xss-Protection: 0
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: {
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "projectNumber": "123456789123",
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "projectId": "redacted-project-id",
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "lifecycleState": "ACTIVE",
2024-10-03T10:49:13.634+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "name": "redacted-project-id",
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "createTime": "redacted",
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "parent": {
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:   "type": "folder",
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:   "id": "redacted"
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  }
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: }
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: -----------------------------------------------------
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: Stopping retries, last request was successful
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: Returning after 1 attempts
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Waiting for state to become: [success]
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [INFO] Instantiating Google Cloud Billing client for path https://cloudbilling.googleapis.com/
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: starting RoundTrip retry loop
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: request attempt 0
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Google API Request Details:
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: ---[ REQUEST ]---------------------------------------
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: GET /v1/projects/123456789123/billingInfo?alt=json&prettyPrint=false HTTP/1.1
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Host: cloudbilling.googleapis.com
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: User-Agent: google-api-go-client/0.5 Terraform/1.9.7 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google/6.5.0
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Goog-Api-Client: gl-go/1.21.13 gdcl/0.193.0
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Accept-Encoding: gzip
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.635+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: -----------------------------------------------------
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Google API Response Details:
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: ---[ RESPONSE ]--------------------------------------
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: HTTP/2.0 200 OK
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Cache-Control: private
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Content-Type: application/json; charset=UTF-8
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Date: Thu, 03 Oct 2024 09:49:13 GMT
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Server: ESF
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: Origin
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: X-Origin
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: Vary: Referer
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Content-Type-Options: nosniff
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Frame-Options: SAMEORIGIN
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: X-Xss-Protection: 0
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: {
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "name": "projects/redacted-project-id/billingInfo",
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "projectId": "redacted-project-id",
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "billingAccountName": "billingAccounts/redacted-billing-account",
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5:  "billingEnabled": true
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: }
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: -----------------------------------------------------
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: Stopping retries, last request was successful
2024-10-03T10:49:13.982+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] Retry Transport: Returning after 1 attempts
2024-10-03T10:49:13.985+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] [transport] [server-transport 0x14000531c80] Closing: Server.Stop called 
2024-10-03T10:49:13.985+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-10-03T10:49:13.985+0100 [DEBUG] provider.terraform-provider-google_v6.5.0_x5: 2024/10/03 10:49:13 [DEBUG] [transport] [server-transport 0x14000531c80] loopyWriter exiting with error: transport closed by client 
2024-10-03T10:49:13.988+0100 [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/google/6.5.0/darwin_arm64/terraform-provider-google_v6.5.0_x5 id=40691
2024-10-03T10:49:14.007+0100 [DEBUG] provider: plugin exited
2024-10-03T10:49:14.007+0100 [DEBUG] building apply graph to check for errors
2024-10-03T10:49:14.008+0100 [DEBUG] ProviderTransformer: "data.google_project.main (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/google"]
2024-10-03T10:49:14.008+0100 [DEBUG] ReferenceTransformer: "data.google_project.main (expand)" references: []
2024-10-03T10:49:14.008+0100 [DEBUG] ReferenceTransformer: "output.project_id (expand)" references: [data.google_project.main (expand)]
2024-10-03T10:49:14.008+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2024-10-03T10:49:14.008+0100 [DEBUG] pruneUnusedNodes: data.google_project.main (expand) is no longer needed, removing
2024-10-03T10:49:14.008+0100 [DEBUG] pruneUnusedNodes: provider["registry.terraform.io/hashicorp/google"] is no longer needed, removing
2024-10-03T10:49:14.008+0100 [INFO]  backend/local: plan operation completed

Expected Behavior

project_id contains the actual project id of a project - not the the project number.

Actual Behavior

project_id contains the project number.

Changes to Outputs:
  + project_id = "123456789123"

Steps to reproduce

  1. terraform plan

Important Factoids

No response

References

get project_id else use project from provider sets pid from the Id retrieved above project_id attribute set from pid (which may be number)

b/372043702

ggtisc commented 5 days ago

Confirmed issue!

The terraform registry documentation doesn't have information that the project_number can be used instead of the project_id