Skip to content

Fix Issue 24367: The provider hashicorp/google does not support resource type "google_project_service_identity"#15205

Merged
rileykarson merged 5 commits intoGoogleCloudPlatform:mainfrom
rohanchawla23:cas-resolve-cmek-test-sa-error
Sep 26, 2025
Merged

Fix Issue 24367: The provider hashicorp/google does not support resource type "google_project_service_identity"#15205
rileykarson merged 5 commits intoGoogleCloudPlatform:mainfrom
rohanchawla23:cas-resolve-cmek-test-sa-error

Conversation

@rohanchawla23
Copy link
Copy Markdown
Contributor

Old test was causing errors, since google_project_service_identity is a beta resource, which wasn't taken into account. I fixed this issue by creating a separate test for testing the encryption_spec (privateca_capool_cmek) and reverting privateca_capool_all_fields to its previous version. The new test is now skipped, following the precedent set here

Fixes hashicorp/terraform-provider-google#24367

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

Old test was causing errors, since `google_project_service_identity`
is a beta resource. I fixed this issue by creating a separate test
for testing the `encryption_spec` (privateca_capool_cmek) and reverting
privateca_capool_all_fields to its previous version.
@modular-magician
Copy link
Copy Markdown
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 ( 2 files changed, 95 insertions(+), 21 deletions(-))
google-beta provider: Diff ( 2 files changed, 95 insertions(+), 21 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 19 deletions(-))

@modular-magician
Copy link
Copy Markdown
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 ( 2 files changed, 95 insertions(+), 21 deletions(-))
google-beta provider: Diff ( 2 files changed, 95 insertions(+), 21 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 19 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 44
Passed tests: 35
Skipped tests: 8
Affected tests: 1

Click here to see the affected service packages
  • privateca

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
  • TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample [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
Copy Markdown
Collaborator

Tests analytics

Total tests: 44
Passed tests: 35
Skipped tests: 8
Affected tests: 1

Click here to see the affected service packages
  • privateca

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
  • TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample [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
Copy Markdown
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 ( 2 files changed, 96 insertions(+), 20 deletions(-))
google-beta provider: Diff ( 2 files changed, 96 insertions(+), 20 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+), 18 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 44
Passed tests: 35
Skipped tests: 8
Affected tests: 1

Click here to see the affected service packages
  • privateca

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
  • TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample [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

@rohanchawla23 rohanchawla23 marked this pull request as ready for review September 22, 2025 19:34
@github-actions github-actions bot requested a review from roaks3 September 22, 2025 19:35
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 22, 2025

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.

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

@github-actions
Copy link
Copy Markdown

@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@rileykarson
Copy link
Copy Markdown
Member

@modular-magician reassign-reviewer

@github-actions github-actions bot requested review from rileykarson and removed request for roaks3 September 26, 2025 15:59
Modified the existing test to use a mix of a beta-only resources and ga
resources. Removed the separate skipped test I made in a previous
commit, since it's no longer necessary.
@modular-magician
Copy link
Copy Markdown
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 ( 2 files changed, 4 insertions(+), 142 deletions(-))
google-beta provider: Diff ( 2 files changed, 8 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 44
Passed tests: 35
Skipped tests: 8
Affected tests: 1

Click here to see the affected service packages
  • privateca

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
  • TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample [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

Need to add beta provider to all resources in a test with a beta-only
resource.
@modular-magician
Copy link
Copy Markdown
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 ( 2 files changed, 6 insertions(+), 142 deletions(-))
google-beta provider: Diff ( 2 files changed, 12 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 44
Passed tests: 35
Skipped tests: 8
Affected tests: 1

Click here to see the affected service packages
  • privateca

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
  • TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample [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

@rohanchawla23
Copy link
Copy Markdown
Contributor Author

Unit test error seems to occur because it runs terraform init with a provider development override, which is known to cause errors.

Command: utils_test.go:133: running /usr/local/bin/terraform init -input=false:

Warning:

│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI
│ configuration:
│  - hashicorp/google-beta in /home/runner/go/bin
│ 
│ Skip terraform init when using provider development overrides. It is not
│ necessary and may error unexpectedly.

Assuming this error can be ignored, as I can't seem to be able to rerun the test.

Copy link
Copy Markdown
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Not sure why the test can't run locally- you shouldn't need overrides for acceptance tests, they build and run a provider directly from the codebase

@rileykarson
Copy link
Copy Markdown
Member

TGC issue is unrelated

@rileykarson rileykarson added this pull request to the merge queue Sep 26, 2025
Merged via the queue into GoogleCloudPlatform:main with commit fc9b937 Sep 26, 2025
25 of 26 checks passed
@rohanchawla23 rohanchawla23 deleted the cas-resolve-cmek-test-sa-error branch September 26, 2025 22:05
jkrish-c pushed a commit to jkrish-c/magic-modules that referenced this pull request Oct 14, 2025
g-dreva pushed a commit to g-dreva/magic-modules that referenced this pull request Oct 15, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 20, 2025
JianweiQ pushed a commit to JianweiQ/magic-modules that referenced this pull request Feb 20, 2026
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.

Failing test(s): TestAccPrivatecaCaPool_privatecaCapoolAllFieldsExample

3 participants