Skip to content

feat: Add Terraform support for Chronicle Parser and ParserExtension#17732

Open
govisingh-dotcom wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
govisingh-dotcom:chronicle-parser-govisingh
Open

feat: Add Terraform support for Chronicle Parser and ParserExtension#17732
govisingh-dotcom wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
govisingh-dotcom:chronicle-parser-govisingh

Conversation

@govisingh-dotcom
Copy link
Copy Markdown

@govisingh-dotcom govisingh-dotcom commented May 26, 2026

Description

This pull request introduces Terraform support for two new resources under the Chronicle ParserService API surface:

  1. google_chronicle_parser: Manages Chronicle custom parsers (updatable, server-assigned IDs).
  2. google_chronicle_parser_extension: Manages Chronicle parser extensions (immutable, server-assigned IDs).

These resources utilize the standard regionalized control plane endpoint https://{{location}}-chronicle.googleapis.com/v1beta/ to ensure correct GFE routing, and implement short-ID mapping using the id_from_name.tmpl custom flattener for their server-assigned UUID identifiers.

Key changes include:

  • Resource definition in mmv1/products/chronicle/Parser.yaml.
  • Resource definition in mmv1/products/chronicle/ParserExtension.yaml.
  • HCL test configuration in mmv1/templates/terraform/examples/chronicle_parser_basic.tf.tmpl and chronicle_parser_full.tf.tmpl.
  • HCL test configuration in mmv1/templates/terraform/examples/chronicle_parserextension_basic.tf.tmpl and chronicle_parserextension_full.tf.tmpl.
  • Added official REST API reference and custom parser guides inside the references metadata section for both resources.
  • Implemented ignore_read_extra for asynchronous validation properties (state, validation_report, validation_stage, state_last_changed_time, extension_validation_report) to prevent eventual-consistency timing flakiness during ImportStateVerify.

Tested

To address reviewer feedback and ensure robust validation of all optional, nested, and complex UDM blocks, we added four automated acceptance tests (two per resource).

Furthermore, to guarantee safe parallel execution in the GitHub CI presubmits and prevent Spanner locking collisions, each test has been mapped to a completely unique prebuilt log type:

  • TestAccChronicleParser_chronicleParserBasicExample (WINDOWS_DHCP)
  • TestAccChronicleParser_chronicleParserFullExample (LINUX_DHCP)
  • TestAccChronicleParserExtension_chronicleParserextensionBasicExample (CISCO_DHCP)
  • TestAccChronicleParserExtension_chronicleParserextensionFullExample (AKAMAI_DHCP)

All 4 tests successfully compiled and PASSED concurrently in parallel in the developer workstation sandbox:

=== RUN   TestAccChronicleParserExtension_chronicleParserextensionBasicExample
=== RUN   TestAccChronicleParserExtension_chronicleParserextensionFullExample
=== RUN   TestAccChronicleParser_chronicleParserBasicExample
=== RUN   TestAccChronicleParser_chronicleParserFullExample
--- PASS: TestAccChronicleParser_chronicleParserBasicExample (22.07s)
--- PASS: TestAccChronicleParser_chronicleParserFullExample (22.73s)
--- PASS: TestAccChronicleParserExtension_chronicleParserextensionFullExample (25.15s)
--- PASS: TestAccChronicleParserExtension_chronicleParserextensionBasicExample (25.25s)
PASS
ok      github.com/hashicorp/terraform-provider-google-beta/google-beta/services/chronicle      25.428s

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 26, 2026
@github-actions github-actions Bot requested a review from rileykarson May 26, 2026 13:30
@github-actions
Copy link
Copy Markdown

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

@rileykarson, 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.

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.

2 participants