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

google_cloud_run_v2_job Resource Not Available during terraform plan #13194

Closed
GoodmanBen opened this issue Dec 7, 2022 · 3 comments
Closed
Labels

Comments

@GoodmanBen
Copy link

GoodmanBen commented Dec 7, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v1.2.9
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v4.45.0
+ provider registry.terraform.io/hashicorp/google-beta v4.45.0

Affected Resource(s)

  • google_cloud_run_v2_job

Terraform Configuration Files

Note that this configuration exactly matches the example for this resource in the official docs: https://github.com/hashicorp/terraform-provider-google/blob/main/website/docs/r/cloud_run_v2_job.html.markdown.

The only change is that we have added provider references for google and google-beta.

resource "google_cloud_run_v2_job" "default" {
  name     = "cloudrun-job"
  location = "us-central1"
  launch_stage = "BETA"
  provider = google

  template {
    template {
      containers {
        image = "us-docker.pkg.dev/cloudrun/container/hello"
      }
    }
  }
}

resource "google_cloud_run_v2_job" "default-two" {
  name     = "cloudrun-job"
  location = "us-central1"
  launch_stage = "BETA"
  provider = google-beta

  template {
    template {
      containers {
        image = "us-docker.pkg.dev/cloudrun/container/hello"
      }
    }
  }
}

Debug Output

NA

Panic Output

NA

Expected Behavior

Based on the examples provided, and from using the latest versions of both google and google-beta, this should have successfully planned.

Actual Behavior

The plan errors out with the following errors:

Error: Invalid resource type
on .terraform/modules/.../cloud_run_job/main.tf line 32, in resource "google_cloud_run_v2_job" "default-two":
resource "google_cloud_run_v2_job" "default-two" {
The provider hashicorp/google-beta does not support resource type "google_cloud_run_v2_job".
Error: Invalid resource type
on .terraform/modules/.../cloud_run_job/main.tf line 17, in resource "google_cloud_run_v2_job" "default":
resource "google_cloud_run_v2_job" "default" {
The provider hashicorp/google does not support resource type "google_cloud_run_v2_job".

Steps to Reproduce

  1. Copy the above Terraform configuration into a main.tf file
  2. Specify a versions.tf file with both google and google-beta providers at version 4.45.0 and terraform version 1.2.9.
  3. terraform plan

Important Factoids/References:

@GoodmanBen GoodmanBen added the bug label Dec 7, 2022
@GoodmanBen GoodmanBen changed the title Cloud Run Job Resource Not Available google_cloud_run_v2_job Resource Not Available Dec 7, 2022
@GoodmanBen GoodmanBen changed the title google_cloud_run_v2_job Resource Not Available google_cloud_run_v2_job Resource Not Available during terraform plan Dec 7, 2022
@shuyama1
Copy link
Collaborator

shuyama1 commented Dec 7, 2022

@GoodmanBen Thanks for filing the issue! google_cloud_run_v2_job has been merged but not yet released. You can check what features have been released at https://github.com/hashicorp/terraform-provider-google/releases. This resource is expected to be released in the next version 4.46.0 early next week. If you need the resource prior to that, you can try to build the provider locally and use that. Hope this helps!

@GoodmanBen
Copy link
Author

Ah okay, that makes sense, I had seen it get merged and assumed that that also meant it was released in the 4.45.0.

Thank you for the help!

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants