Skip to content

Conversation

@kvanzuijlen
Copy link
Contributor

This PR adds a resource for Cloud Logging Saved Queries, which can be used for both Logging Saved Queries and Log Analytics Saved Queries.

Fixes hashicorp/terraform-provider-google#18023

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_logging_saved_query`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 21, 2026
@kvanzuijlen kvanzuijlen marked this pull request as ready for review January 21, 2026 15:11
@github-actions github-actions bot requested a review from roaks3 January 21, 2026 15:12
@github-actions
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@roaks3, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

Copy link
Contributor

@ramonvermeulen ramonvermeulen left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

Ran tests locally:

sh -c "'/Users/ramon/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
TF_ACC_REFRESH_AFTER_APPLY=1 TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google/services/logging -v -run=TestAccLoggingSavedQuery_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"                    
=== RUN   TestAccLoggingSavedQuery_loggingSavedQueryBasicExample
=== PAUSE TestAccLoggingSavedQuery_loggingSavedQueryBasicExample
=== RUN   TestAccLoggingSavedQuery_loggingSavedQueryPrivateExample
=== PAUSE TestAccLoggingSavedQuery_loggingSavedQueryPrivateExample
=== RUN   TestAccLoggingSavedQuery_loggingSavedQuerySummaryFieldsExample
=== PAUSE TestAccLoggingSavedQuery_loggingSavedQuerySummaryFieldsExample
=== RUN   TestAccLoggingSavedQuery_loggingSavedQuerySqlBasicExample
=== PAUSE TestAccLoggingSavedQuery_loggingSavedQuerySqlBasicExample
=== RUN   TestAccLoggingSavedQuery_update
=== PAUSE TestAccLoggingSavedQuery_update
=== CONT  TestAccLoggingSavedQuery_loggingSavedQueryBasicExample
=== CONT  TestAccLoggingSavedQuery_loggingSavedQuerySqlBasicExample
=== CONT  TestAccLoggingSavedQuery_loggingSavedQuerySummaryFieldsExample
=== CONT  TestAccLoggingSavedQuery_update
=== CONT  TestAccLoggingSavedQuery_loggingSavedQueryPrivateExample
--- PASS: TestAccLoggingSavedQuery_loggingSavedQuerySummaryFieldsExample (7.36s)
--- PASS: TestAccLoggingSavedQuery_loggingSavedQueryBasicExample (7.87s)
--- PASS: TestAccLoggingSavedQuery_loggingSavedQueryPrivateExample (8.01s)
--- PASS: TestAccLoggingSavedQuery_loggingSavedQuerySqlBasicExample (8.17s)
--- PASS: TestAccLoggingSavedQuery_update (12.32s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/logging  13.990s

…aved_query_test.go

Co-authored-by: Ramon Vermeulen <ramonvermeulen98@gmail.com>
@kvanzuijlen kvanzuijlen changed the title feat: Add Cloud Logging Saved Query resource feat(logging): Add Cloud Logging Saved Query resource Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource for Cloud Logging saved queries?

3 participants