Skip to content

iam_binding: set ResourceIdentity when members are nil#17672

Merged
BBBmau merged 1 commit into
GoogleCloudPlatform:mainfrom
BBBmau:identity-set-binding-noMembers
May 26, 2026
Merged

iam_binding: set ResourceIdentity when members are nil#17672
BBBmau merged 1 commit into
GoogleCloudPlatform:mainfrom
BBBmau:identity-set-binding-noMembers

Conversation

@BBBmau

@BBBmau BBBmau commented May 21, 2026

Copy link
Copy Markdown
Collaborator

ResourceIdentity was only being set when matching binding was found, leaving the case of noMembers not covered resulting in missing identity error in VCR. This resolves the failing test we see currently:

Error recording tests:
error running go: exit status 1
stdout:
=== RUN   TestAccProjectIamBinding_noMembers
=== PAUSE TestAccProjectIamBinding_noMembers
=== CONT  TestAccProjectIamBinding_noMembers
    resource_google_project_iam_binding_test.go:231: Step 3/3 error running import: exit status 1
        
        Error: Missing Resource Identity After Read: The Terraform provider unexpectedly returned no resource identity after having no errors in the resource read. This is always a problem with the provider and should be reported to the provider developer
        
        
--- FAIL: TestAccProjectIamBinding_noMembers (61.63s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta/services/resourcemanager	61.709s
FAIL
stderr:

follow-up to #17587

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@BBBmau BBBmau requested a review from trodge May 21, 2026 18:33
@modular-magician

modular-magician commented May 21, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 11 insertions(+)
google-beta provider View Diff 1 file changed, 11 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
6459 5788 659 12
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccComputeRouterPeer_AddMd5AuthenticationKey
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataformConfig_update
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccIapWebTypeAppEngineIamMemberGenerated
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccSourceRepoRepositoryIamMemberGenerated

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log ❌ Error · Log TestAccComputeRouterPeer_AddMd5AuthenticationKey
✅ Log ❌ Error · Log TestAccDataformConfig_update
❌ Error · Log - TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
❌ Error · Log - TestAccCloudRunService_cloudRunServiceGpuExample
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccIapWebTypeAppEngineIamMemberGenerated
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample
❌ Error · Log - TestAccSourceRepoRepositoryIamMemberGenerated

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

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

@BBBmau, @trodge VCR tests complete for 1799859!

@BBBmau BBBmau enabled auto-merge May 22, 2026 21:26

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks like the test passed in VCR replaying after this change. The logic matches what happens in the CreateUpdate func.

@BBBmau BBBmau added this pull request to the merge queue May 26, 2026
Merged via the queue into GoogleCloudPlatform:main with commit f45622d May 26, 2026
25 of 26 checks passed
@BBBmau BBBmau deleted the identity-set-binding-noMembers branch May 26, 2026 16:40
MikolajLuczko pushed a commit to MikolajLuczko/magic-modules that referenced this pull request May 28, 2026
gitika-yadav pushed a commit to gitika-yadav/magic-modules that referenced this pull request Jun 10, 2026
muresan pushed a commit to muresan/magic-modules that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants