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

Terraform script to automate GCP provisioning for gcplog #3206

Merged
merged 2 commits into from
Jan 26, 2021
Merged

Terraform script to automate GCP provisioning for gcplog #3206

merged 2 commits into from
Jan 26, 2021

Conversation

kavirajk
Copy link
Collaborator

What this PR does / why we need it:
Automate Cloud provisioning part of GCP log

Which issue(s) this PR fixes:
NA

Special notes for your reviewer:
These scripts will be run to configure GCP cloud to make cloud logs available for promtail.

Checklist

  • Documentation added
  • Tests updated

resource "google_logging_project_sink" "cloud-logs" {
name = var.logname
destination = "pubsub.googleapis.com/projects/personal-226821/topics/${var.logname}"
filter = "resource.type = gcs_bucket AND severity >= WARNING"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, filter is hardcoded. I will add it as variable in future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add to the doc a small section about this filter, the langage , what it does, and let's suggest a sane default ? What do you think would be a good default for someone that wants to get visibility into his cloud ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a sane default. Perhaps we can link to GCP's filter documentation in the README, but I don't think we need to add much tooling here to change it -- this can serve as a template.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with filter doc and sane defaults.

  1. Added some explanation on the README with doc link
  2. I think sane default would be some cloud resource most of the customer be having. httpLoadBalancer? so I added that. wdyt?

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 25, 2021
@owen-d owen-d merged commit 6856209 into grafana:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants