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* #19857

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* (hashicorp#11898)

[upstream:0b8a8585660d86b3ee6494caa91dfa737f3ff507]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit db6e971 into hashicorp:main Oct 15, 2024
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2024
@modular-magician modular-magician deleted the downstream-pr-0b8a8585660d86b3ee6494caa91dfa737f3ff507 branch November 16, 2024 23:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant