Skip to content

Commit

Permalink
Revert "add support for IAM Group authentication to google_sql_user (G…
Browse files Browse the repository at this point in the history
…oogleCloudPlatform#9505)"

This reverts commit 49640f7.
  • Loading branch information
pratikgarg10 authored Nov 28, 2023
1 parent 49640f7 commit a734919
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
6 changes: 2 additions & 4 deletions mmv1/third_party/terraform/services/sql/resource_sql_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ func ResourceSqlUser() *schema.Resource {
ForceNew: true,
DiffSuppressFunc: tpgresource.EmptyOrDefaultStringSuppress("BUILT_IN"),
Description: `The user type. It determines the method to authenticate the user during login.
The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", "CLOUD_IAM_SERVICE_ACCOUNT",
"CLOUD_IAM_GROUP", "CLOUD_IAM_GROUP_USER" or "CLOUD_IAM_GROUP_SERVICE_ACCOUNT".`,
ValidateFunc: validation.StringInSlice([]string{"BUILT_IN", "CLOUD_IAM_USER", "CLOUD_IAM_SERVICE_ACCOUNT",
"CLOUD_IAM_GROUP", "CLOUD_IAM_GROUP_USER", "CLOUD_IAM_GROUP_SERVICE_ACCOUNT", ""}, false),
The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT".`,
ValidateFunc: validation.StringInSlice([]string{"BUILT_IN", "CLOUD_IAM_USER", "CLOUD_IAM_SERVICE_ACCOUNT", ""}, false),
},
"sql_server_user_details": {
Type: schema.TypeList,
Expand Down
11 changes: 0 additions & 11 deletions mmv1/third_party/terraform/services/sql/resource_sql_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func TestAccSqlUser_mysql(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user1"),
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user2"),
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user3"),
),
},
{
Expand All @@ -35,7 +34,6 @@ func TestAccSqlUser_mysql(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user1"),
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user2"),
testAccCheckGoogleSqlUserExists(t, "google_sql_user.user3"),
),
},
{
Expand Down Expand Up @@ -313,15 +311,6 @@ resource "google_sql_user" "user2" {
instance = google_sql_database_instance.instance.name
host = "gmail.com"
password = "hunter2"
type = "CLOUD_IAM_USER"
}
resource "google_sql_user" "user3" {
name = "admin"
instance = google_sql_database_instance.instance.name
host = "gmail.com"
password = "hunter3"
type = "CLOUD_IAM_GROUP"
}
`, instance, password)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ The following arguments are supported:

* `type` - (Optional) The user type. It determines the method to authenticate the
user during login. The default is the database's built-in user type. Flags
include "BUILT_IN", "CLOUD_IAM_USER", "CLOUD_IAM_SERVICE_ACCOUNT", or
"CLOUD_IAM_GROUP", "CLOUD_IAM_GROUP_USER" or "CLOUD_IAM_GROUP_SERVICE_ACCOUNT".
include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT".

* `deletion_policy` - (Optional) The deletion policy for the user.
Setting `ABANDON` allows the resource to be abandoned rather than deleted. This is useful
Expand Down

0 comments on commit a734919

Please sign in to comment.