Skip to content

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

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

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 merged commit f465f0b into hashicorp:main Oct 15, 2024
@modular-magician modular-magician deleted the downstream-pr-0b8a8585660d86b3ee6494caa91dfa737f3ff507 branch November 16, 2024 02:04
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