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.25k stars 1.7k forks source link

Support gRPC probes for `google_cloud_run_service` #12954

Open janhicken opened 1 year ago

janhicken commented 1 year ago

Community Note

Description

The Cloud Run API now supports gRPC startup and liveness probes. Only HTTP and TCP probes are supported by the Terraform resource yet.

As this a beta feature, it should only be added to the google-beta provider. Also, it requires the user to set the run.googleapis.com/launch-stage annotation to BETA, see the example below.

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_cloud_run_service" "my_service" {
  metadata {
    annotations = {
      "run.googleapis.com/launch-stage": "BETA"
    }
  }
  template {
    spec {
      containers {
        grpc_probe {
          port = 8080 # (required)
          service_name = "io.github.example.MyService" # (optional)
        }
      }
    }
  } 
}

References

yanweiguo commented 1 month ago

This is done by https://github.com/GoogleCloudPlatform/magic-modules/pull/6987