Open JeffLuoo opened 1 year ago
google_gkehub_feature has a field feature and the feature field has another field spec, a new field fleetobservability is added recently and can be configured with following example to enable the fleetobservability feature:
google_gkehub_feature
feature
spec
fleetobservability
resource "google_gke_hub_feature" "feature" { project = "test-project" name = "fleetobservability" location = "global" spec { fleetobservability { logging_config { default_config { mode = "COPY" } fleet_scope_logs_config { mode = "MOVE" } } } } provider = google-beta }
However, I tried to disable the feature by using the following config:
resource "google_gke_hub_feature" "feature" { project = "gke-fleet-obs-dev-fleet-1" name = "fleetobservability" location = "global" spec { fleetobservability { logging_config { } } } provider = google-beta }
and it failed with the error:
Error: Error updating Feature: googleapi: Error 400: MissingFieldError for field spec: should be set Details:
I could use similar config if I want to disable the feature with gcloud by following the instruction: https://cloud.google.com/anthos/fleet-management/docs/fleet-logs#disable_fleet_logging. Hence I wonder how could I disable the fleetobservability feature with the terraform.
gcloud
b/286127157
@JeffLuoo You will need to remove the entire resource "google_gke_hub_feature" "feature" from your terraform script.
google_gkehub_feature
has a fieldfeature
and the feature field has another fieldspec
, a new fieldfleetobservability
is added recently and can be configured with following example to enable thefleetobservability
feature:However, I tried to disable the feature by using the following config:
and it failed with the error:
I could use similar config if I want to disable the feature with
gcloud
by following the instruction: https://cloud.google.com/anthos/fleet-management/docs/fleet-logs#disable_fleet_logging. Hence I wonder how could I disable thefleetobservability
feature with the terraform.