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

Add inputs for filtering service accounts with data source google_service_accounts #12802

Conversation

bestefreund
Copy link
Contributor

@bestefreund bestefreund commented Jan 18, 2025

Add inputs prefix and regex for filtering service accounts with data source google_service_accounts

Fixes hashicorp/terraform-provider-google#20928

Release Note Template for Downstream PRs (will be copied)

iam: added `prefix` and `regex` fields to `google_service_accounts` data source

@github-actions github-actions bot requested a review from ScottSuarez January 18, 2025 09:08
Copy link

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

@ScottSuarez, 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 modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 18, 2025
Copy link
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

small suggestion

"project": {
Type: schema.TypeString,
Optional: true,
},
"regex": {
Type: schema.TypeString,
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@bestefreund bestefreund Jan 21, 2025

Choose a reason for hiding this comment

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

It's a good suggestion.
For me, to check, if a regex compiles, is a repeatable and reusable task.

I'd like to add a function to the github.com/hashicorp/terraform-provider-google/google/verify package and use it from there.

https://github.com/GoogleCloudPlatform/magic-modules/compare/d669298df9bb119749a3afe72ce62e065fc152a4..7d112a31377a0dee0e6e5eaa54df9db491f03928

Please, have a look again.

@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 ( 3 files changed, 100 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 3 files changed, 100 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 160
Passed tests: 128
Skipped tests: 30
Affected tests: 2

Click here to see the affected service packages
  • resourcemanager

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
  • TestAccDataSourceGoogleServiceAccounts_basic
  • TestAccEphemeralServiceAccountKey_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


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

@bestefreund bestefreund force-pushed the feature/options_for_filtering_results_from_data_source_google_service_accounts branch from d669298 to 7d112a3 Compare January 21, 2025 20:49
@github-actions github-actions bot requested a review from ScottSuarez January 21, 2025 20:50
@bestefreund bestefreund force-pushed the feature/options_for_filtering_results_from_data_source_google_service_accounts branch from 7d112a3 to b853a7c Compare January 21, 2025 20:51
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 21, 2025
@bestefreund bestefreund force-pushed the feature/options_for_filtering_results_from_data_source_google_service_accounts branch from b853a7c to 334354e Compare January 21, 2025 22:33
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 23, 2025
@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 ( 4 files changed, 113 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 4 files changed, 113 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4493
Passed tests: 4061
Skipped tests: 428
Affected tests: 4

Click here to see the affected service packages

All service packages are affected

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample
  • TestAccDataSourceGoogleGkeHubFeature_basic
  • TestAccEphemeralServiceAccountKey_basic
  • TestAccStorageTransferReplicationJob_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Debug log]
TestAccStorageTransferReplicationJob_basic [Debug log]

🔴 Tests failed when rerunning REPLAYING mode:
TestAccDataSourceGoogleGkeHubFeature_basic [Error message] [Debug log]

Tests failed due to non-determinism or randomness when the VCR replayed the response after the HTTP request was made.

Please fix these to complete your PR. If you believe these test failures to be incorrect or unrelated to your change, or if you have any questions, please raise the concern with your reviewer.


🔴 Tests failed during RECORDING mode:
TestAccApigeeEnvironmentAddonsConfig_apigeeEnvAddonsAnalyticsTestExample [Error message] [Debug log]
TestAccEphemeralServiceAccountKey_basic [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

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.

Filtering options for data source google_service_accounts
3 participants