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.28k stars 1.72k forks source link

google_bigquery_reservation_assignment does not support all job_type values in BigQuery #17485

Open dangermike opened 6 months ago

dangermike commented 6 months ago

Community Note

Description

The google_bigquery_reservation_assignment type specifies the following job_type values:

However, BigQuery specifies:

This renders Terraform unable to model all reservation assignment types.

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_bigquery_reservation_assignment" "primary" {
  assignee  = "projects/my-project-name"
  job_type = "ML_EXTERNAL"
  reservation = google_bigquery_reservation.basic.id
}

References

dangermike commented 6 months ago

These type appear in the apiv1 docs, but do not appear in the DCL. Am I barking up the wrong tree by bringing this request here?

dangermike commented 6 months ago

I have reached out to my Google Cloud TAMs to try to get the DCL updated:


It looks like the terraform resource for BigQuery reservations (google_bigquery_reservation_assignment) specifies job_type as only JOB_TYPE_UNSPECIFIED, PIPELINE, or QUERY. However, the Google Cloud documentation and the API documentation (go, REST) both also include ML_EXTERNAL and BACKGROUND as available assignment types. I have filed an issue with Terraform, but I think I may be talking to the wrong people. They base their clients on DCL, and the DCL it’s based on is missing those enum values! In fact, when you look in the Terraform provider code, there is a big disclaimer at the top saying that they won’t take any contributions because the whole thing is generated from the DCL.

In short, all signs point to that DCL needing an update. By not having ML_EXTERNAL, the DCL must be older than August, 2021, though BACKGROUND was only added in March, 2023.

Is there any way to get to the right people and poke them for a DCL update? This will impact anyone with ML_EXTERNAL or BACKGROUND reservation assignments they are trying to manage through Terraform.

rileykarson commented 6 months ago

We're the owners of both the provider and the DCL, this is the right place to have filed this. Feature triage happens on a weekly cadence is all!

dangermike commented 4 months ago

@rileykarson it's been two months. Should I assume that this being on the "Goals" milestone means that this isn't going to happen in the near term?

rileykarson commented 4 months ago

Yeah, we don't guarantee specific closure times for most issues. If you're a larger GCP customer there are some addtl channels for input (although getting a guarantee there can be difficult too, subject to Google-internal critieria), from the issue template:

Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

dangermike commented 4 months ago

Thanks, @rileykarson. I wasn't looking for any kind of guarantee, but it seems like this has been pushed into the backlog. I'll ask my TAMs if they can pull the right levers for me.