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.36k stars 1.75k forks source link

Failing using default_url_disabled with cloud run #19788

Open eitanova opened 1 month ago

eitanova commented 1 month ago

Community Note

Terraform Version & Provider Version(s)

Terraform v1.9.5 on windows_amd64

Affected Resource(s)

google_cloud_run_v2_service

Terraform Configuration

provider "google-beta" {
  project = local.config.mtls_project_id
  region  = local.config.default_region
}
resource "google_cloud_run_v2_service" "default" {
  provider = google-beta
  name     = "cloudrun-service"
  location = "me-west1"
  deletion_protection = false
  ingress = "INGRESS_TRAFFIC_ALL"
  launch_stage = "BETA"

  template {
    containers {
      image = "us-docker.pkg.dev/cloudrun/container/hello"
      resources {
        limits = {
          "cpu" = "4"
          "memory" = "16Gi"
          "nvidia.com/gpu" = "1"
        }
        startup_cpu_boost = true
      }
    }
    node_selector {
      accelerator = "nvidia-l4"
      default_uri_disabled = true

    }
    scaling {
      max_instance_count = 1
    }
  }
}

Debug Output

https://gist.github.com/eitanova/9d603af68d4339e86ccfb5caf0283024

Expected Behavior

Create cloud run service without the default url

Actual Behavior

Error for unsupported argument (default_uri_disabled)

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

No response

b/372531707

ggtisc commented 1 month ago

Confirmed issue!

It is not possible to use the default_uri_disabled argument because it is returning the following message:

Unexpected attribute: An attribute named "default_uri_disabled" is not expected here

bskaplan commented 1 month ago

default_uri_disabled is a top level attribute on the resource, not a part of node_selector.