Skip to content

Add AutoLabelingRule resource for contactcenterinsights#16513

Open
scawful wants to merge 25 commits intoGoogleCloudPlatform:mainfrom
scawful:scawful-autolabeling-rule
Open

Add AutoLabelingRule resource for contactcenterinsights#16513
scawful wants to merge 25 commits intoGoogleCloudPlatform:mainfrom
scawful:scawful-autolabeling-rule

Conversation

@scawful
Copy link
Contributor

@scawful scawful commented Feb 24, 2026

Add AutoLabelingRule resource for contactcenterinsights
https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations.autoLabelingRules

`google_contact_center_insights_auto_labeling_rule`

@github-actions github-actions bot requested a review from hao-nan-li February 24, 2026 19:29
@github-actions
Copy link

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

@hao-nan-li, 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.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1483 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1483 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  active                = # value needed
  auto_labeling_rule_id = # value needed
  conditions {
    condition = # value needed
    value     = # value needed
  }
  description    = # value needed
  display_name   = # value needed
  label_key      = # value needed
  label_key_type = # value needed
  location       = # value needed
}

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

What's the reason to include the huge json file in this PR?

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@github-actions github-actions bot requested a review from hao-nan-li February 24, 2026 19:56
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1483 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1483 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (0 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  active                = # value needed
  auto_labeling_rule_id = # value needed
  conditions {
    condition = # value needed
    value     = # value needed
  }
  description    = # value needed
  display_name   = # value needed
  label_key      = # value needed
  label_key_type = # value needed
  location       = # value needed
}

@scawful
Copy link
Contributor Author

scawful commented Feb 24, 2026

I've removed the large OpenAPI JSON file and fixed the HCL quoting issues in the examples and tests. I also added explicit resource IDs to the test configurations.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1483 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1487 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1487 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1487 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1487 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1487 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

2 similar comments
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 7
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Error message] [Debug log]
TestAccContactCenterInsightsAutoLabelingRule_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@scawful
Copy link
Contributor Author

scawful commented Feb 24, 2026

Shortened the resource ID to avoid potential length or pattern mismatch errors from the backend. Also simplified the CEL expression quoting in case it was failing server-side validation.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 8 files changed, 1485 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 112 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_contact_center_insights_auto_labeling_rule (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_contact_center_insights_auto_labeling_rule" "primary" {
  description = # value needed
}

@scawful scawful force-pushed the scawful-autolabeling-rule branch from 457a977 to 6c5f2da Compare March 3, 2026 01:16
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1358 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1358 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 8
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1358 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1358 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 9
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • contactcenterinsights

🟢 All tests passed!

View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1359 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1359 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 9
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • contactcenterinsights

🟢 All tests passed!

View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample
  • TestAccContactCenterInsightsAutoLabelingRule_update

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • contactcenterinsights

🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 8
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

Is this PR ready for review, asking because I still see some commits going on.

@scawful
Copy link
Contributor Author

scawful commented Mar 4, 2026

Is this PR ready for review, asking because I still see some commits going on.

Apologies for the noise, I was using Gemini CLI to help with the provider development. I'll review it myself now as well to verify how grounded the implementation is then let you know!

@github-actions github-actions bot requested a review from hao-nan-li March 4, 2026 18:52
@scawful
Copy link
Contributor Author

scawful commented Mar 7, 2026

Fixed the auto_labeling_rule_id pattern to be strictly alphanumeric to match the backend API requirements. Also, to address your earlier comments: the large JSON file was removed in a previous commit, and I've confirmed that the resource creation is synchronous, so the async configuration was removed.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 7 files changed, 1360 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 211 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 9
Passed tests: 8
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • contactcenterinsights

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccContactCenterInsightsAutoLabelingRule_contactCenterInsightsAutoLabelingRuleBasicExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants