GoogleCloudPlatform / k8s-config-connector

GCP Config Connector, a Kubernetes add-on for managing GCP resources
https://cloud.google.com/config-connector/docs/overview
Apache License 2.0
894 stars 222 forks source link

Add ability to enable analytics to logging log bucket #875

Open snuggie12 opened 1 year ago

snuggie12 commented 1 year ago

Checklist

Describe the feature or resource

Looks like this is possible via terraform and gcloud so was hoping config connector could do it as well. This is the equivalent to gcloud logging buckets create --enable-analytics.

Additional information

No response

Importance

We're trying to move off of terraform so it's a nice to have but not strictly necessary.

snuggie12 commented 1 year ago

I'll also add that I'm happy to attempt making any changes if I can be pointed in the right direction.

diviner524 commented 1 year ago

@snuggie12 Do you know which field in the Terraform resource is used to enable this?

This CRD is unfortunately not based on Terraform so we cannot piggyback on Terraform upgrade.

Instead we will need an updated version of this resource in DCL.

https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/master/crds/logging_v1beta1_logginglogbucket.yaml#L22

snuggie12 commented 1 year ago

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/logging_project_bucket_config#enable_analytics

newtondev commented 11 months ago

The latest google-api-go-client has this field defined, so not sure why the auto generated DCL should not already have this:

https://github.com/newtondev/google-api-go-client/blob/d07fe323e887d43e0b3a4bdd9c9c9f9c62ea34af/logging/v2/logging-api.json#L8593

https://github.com/newtondev/google-api-go-client/blob/d07fe323e887d43e0b3a4bdd9c9c9f9c62ea34af/logging/v2/logging-gen.go#L2641

We cannot migrate over some of our resources as we have this feature enabled on existing logbuckets.

wtait1-ff commented 4 months ago

This field was added a few months ago so this issue can get closed out ✅ curious how it will work for the auto-generated _Default and _Required buckets though, as that's my current use case