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

Fix the regression of handling deleted IAM members in google_bigquery_dataset_iam* #2934

Conversation

modular-magician
Copy link
Collaborator

After GoogleCloudPlatform/magic-modules#9948, the following logic in accessToIamMember changed from:

if member, ok := access["iamMember"]; ok {
	return member.(string), nil
}

to

if member, ok := access["iamMember"]; ok {
	return fmt.Sprintf("iamMember:%s", member.(string)), nil
}

Since deleted service accounts show up in dataset.access as an iamMember:

{
    "iamMember": "deleted:serviceAccount:sa-tf-deletion-test-a@wjchen-osconfig-test.iam.gserviceaccount.com?uid=110999291001447756607",
    "role": "READER"
}

It means that the new access["iamMember"] value changed from deleted:serviceAccount:... to iamMember:deleted:serviceAccount:....

Release Note Template for Downstream PRs (will be copied)

bigquery: fixed a regression that caused `google_bigquery_dataset_iam_*` resources to attempt to set deleted IAM members, thereby triggering an API error 

Derived from GoogleCloudPlatform/magic-modules#11898

…_dataset_iam* (#11898)

[upstream:0b8a8585660d86b3ee6494caa91dfa737f3ff507]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner October 15, 2024 14:30
@modular-magician modular-magician requested review from iyabchen and removed request for a team October 15, 2024 14:30
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@modular-magician modular-magician merged commit 784357a into GoogleCloudPlatform:main Oct 15, 2024
4 of 6 checks passed
@modular-magician modular-magician deleted the downstream-pr-0b8a8585660d86b3ee6494caa91dfa737f3ff507 branch November 18, 2024 05:20
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.

1 participant