Skip to content

Add google_service_account_key list resource#18242

Draft
vr-ibm wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
vr-ibm:service-account-key-list-resource
Draft

Add google_service_account_key list resource#18242
vr-ibm wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
vr-ibm:service-account-key-list-resource

Conversation

@vr-ibm

@vr-ibm vr-ibm commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Fixes hashicorp/terraform-provider-google#28259

Adds a new list resource google_service_account_key for Terraform 1.14+ terraform query support. This allows users to list all service account keys for a given service account.

Details

  • Adds list resource implementation for google_service_account_key
  • Adds Identity block to google_service_account_key resource
  • Adds acceptance test TestAccListGoogleServiceAccountKey_queryIdentity
  • Adds documentation for the list resource

Release Note Template for Downstream PRs (will be copied)

resourcemanager: added `google_service_account_key` list resource for `terraform query` support

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 9, 2026
@modular-magician modular-magician added service/iam-serviceaccount and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jul 9, 2026
@modular-magician

modular-magician commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 4 files changed, 360 insertions(+), 1 deletion(-)
google-beta provider View Diff 4 files changed, 360 insertions(+), 1 deletion(-)

Test report

Analytics

Total Tests Passed Skipped Affected
184 151 31 2
Affected Service Packages
  • resourcemanager

Learn how VCR tests work


Step 1: Replaying Mode

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
  • TestAccListGoogleServiceAccountKey_queryIdentity
  • TestAccProjectIamMemberRemove_memberInMultipleBindings

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccListGoogleServiceAccountKey_queryIdentity
✅ Log ❌ Error · Log TestAccProjectIamMemberRemove_memberInMultipleBindings

Caution

Issues requiring attention before PR completion

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@vr-ibm VCR tests complete for f6013f6!

})
}

func flattenServiceAccountKey(d *schema.ResourceData, config *transport_tpg.Config, sak *iam.ServiceAccountKey) error {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this should be done in its own PR to ensure that the flattener is done properly

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.

list resource: google_service_account_key

3 participants