-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TestAccSqlUser_postgresIAM by using an IAM user that actually exists
- Loading branch information
Scott Mitchell
committed
May 21, 2024
1 parent
430f650
commit e2f57c6
Showing
1 changed file
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,6 @@ func TestAccSqlUser_postgres(t *testing.T) { | |
} | ||
|
||
func TestAccSqlUser_postgresIAM(t *testing.T) { | ||
t.Skipf("Skipping test %s due to https://github.com/hashicorp/terraform-provider-google/issues/16704", t.Name()) | ||
t.Parallel() | ||
|
||
instance := fmt.Sprintf("tf-test-%d", acctest.RandInt(t)) | ||
|
@@ -428,9 +427,17 @@ resource "time_sleep" "wait_30_seconds" { | |
create_duration = "30s" | ||
} | ||
data "google_project" "project" {} | ||
resource "google_project_iam_member" "iam_user" { | ||
project = data.google_project.project.project_id | ||
role = "roles/cloudsql.instanceUser" | ||
member = "user:[email protected]" | ||
} | ||
resource "google_sql_user" "user" { | ||
depends_on = [time_sleep.wait_30_seconds] | ||
name = "admin" | ||
depends_on = [time_sleep.wait_30_seconds, google_project_iam_member.iam_user] | ||
name = "admin@hashicorptest.com" | ||
instance = google_sql_database_instance.instance.name | ||
type = "CLOUD_IAM_USER" | ||
} | ||
|