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 location field not being marked required #15967

Closed

Comments

@oscar-sosa
Copy link

oscar-sosa commented Sep 22, 2023

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 -v
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.81.0
+ provider registry.terraform.io/hashicorp/google-beta v4.81.0
+ provider registry.terraform.io/hashicorp/random v3.5.1

Affected Resource(s)

  • google_cloud_run_v2_job

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
#    https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.
locals {
  drupal_nfs_deploy = <<EOT
#!/usr/bin/env bash
set -eo pipefail
source_bucket=gs://place
export NFS_ROOT=/mnt/nfs_root
export CURRENT=$NFS_ROOT/foo-drupal-be
export NEXT=$NFS_ROOT/foo-drupal-be-NEXT
mkdir -p $NFS_ROOT
mount -o nolock $FILESTORE_IP_ADDRESS:/$FILE_SHARE_NAME $NFS_ROOT
mkdir -p $NEXT
cd $NEXT
echo "Extracting web from $source_bucket/$web_tgz"
gsutil cat $source_bucket/$web_tgz | tar -xvz
echo "Extracting vendor from $source_bucket/$vendor_tgz"
gsutil cat $source_bucket/$vendor_tgz | tar -xvz
EOT
}

resource "google_cloud_run_v2_job" "drupal_update_nfs" {
  name = "stage_drupal_deploy"
  template {
    template {
      execution_environment = "EXECUTION_ENVIRONMENT_GEN2"
      vpc_access {
        connector = google_vpc_access_connector.main.id
        egress    = "ALL_TRAFFIC"
      }
      service_account = google_service_account.drupal.email
      containers {
        image   = "debian"
        command = ["bash", "-c", local.drupal_nfs_deploy]

      }
    }
  }
}

Debug Output

2023-09-22T16:56:54.474-0500 [DEBUG] provider.terraform-provider-google-beta_v4.81.0_x5: 2023/09/22 16:56:54 [DEBUG] Retry Transport: request attempt 0
2023-09-22T16:56:54.475-0500 [DEBUG] provider.terraform-provider-google-beta_v4.81.0_x5: 2023/09/22 16:56:54 [DEBUG] Google API Request Details:
2023-09-22T16:56:54.475-0500 [DEBUG] provider.terraform-provider-google-beta_v4.81.0_x5: ---[ REQUEST ]---------------------------------------
2023-09-22T16:56:54.475-0500 [DEBUG] provider.terraform-provider-google-beta_v4.81.0_x5: POST /v2/projects/xxxxx-develop/locations//jobs?alt=json&jobId=stage_drupal_deploy HTTP/1.1

Expected Behavior

terraform plan must fail indicating the missing location argument.

Actual Behavior

The provider makes a malformed API request that ends up with this error in the debug output: Error: Error creating Job: googleapi: Error 501: Operation is not implemented, or supported, or enabled

Steps to Reproduce

  1. terraform plan

Important Factoids

none

References

b/301816452

Copy link

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 Nov 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.