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

Add stackdriverLoggingConfig to google_cloud_tasks_queue #5544

Assignees
Labels
Milestone

Comments

@courteouselk
Copy link

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 the 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 the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

The REST API of GCP allows to configure stackdriverLoggingConfig on a Cloud Task Queue.

See:

It would be great if it would be also possible to configure this feature via Terraform.

New or Affected Resource(s)

  • google_cloud_tasks_queue

Potential Terraform Configuration

resource "google_cloud_tasks_queue" "default" {
  provider = google-beta

  stackdriver_logging_config {
    sampling_ratio = 0.5
  }
}
@ghost ghost added the enhancement label Jan 30, 2020
@danawillow danawillow added this to the Goals milestone Feb 3, 2020
@jeet-parekh
Copy link
Contributor

I'll try this one.

@jeet-parekh
Copy link
Contributor

Would like a confirmation before I make any changes. The change has to be made in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/products/cloudtasks/api.yaml, right?

The samplingRatio has to be between 0.0 and 1.0. Is there a way to enforce that through magic modules?
https://cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues#stackdriverloggingconfig

@danawillow
Copy link
Contributor

@jeet-parekh correct! You'll also probably need to make changes in the corresponding terraform.yaml file. Enforcing the samplingRatio would be done via a validate func; FloatBetween should do it. Search MM for "validation" to see how we typically add those.

@jeet-parekh
Copy link
Contributor

I couldn't make this work. Please feel free to pick it up. I'll be watching this issue to understand the fix.

@itsmesuniljacob
Copy link

I agree to the above point, it would be really if logging can be configured through Terraform

@ghost
Copy link

ghost commented Nov 9, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 9, 2020
@github-actions github-actions bot added service/cloudtasks forward/review In review; remove label to forward labels Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.