Skip to content

Commit 40a2d76

Browse files
ramonvermeulenDawid212
authored andcommitted
feat: added disabled_user_signup and disabled_user_deletion to google_identity_platform_tenant (GoogleCloudPlatform#12841)
1 parent 3e380fd commit 40a2d76

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

mmv1/products/identityplatform/Tenant.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,21 @@ properties:
6363
Whether authentication is disabled for the tenant. If true, the users under
6464
the disabled tenant are not allowed to sign-in. Admins of the disabled tenant
6565
are not able to manage its users.
66+
- name: 'client'
67+
type: NestedObject
68+
description: |
69+
Options related to how clients making requests on behalf of a tenant should be configured.
70+
properties:
71+
- name: 'permissions'
72+
type: NestedObject
73+
description: |
74+
Configuration related to restricting a user's ability to affect their account.
75+
properties:
76+
- name: 'disabledUserSignup'
77+
type: Boolean
78+
description: |
79+
When true, end users cannot sign up for a new account on the associated project through any of our API methods.
80+
- name: 'disabledUserDeletion'
81+
type: Boolean
82+
description: |
83+
When true, end users cannot delete their account on the associated project through any of our API methods.

mmv1/third_party/terraform/services/identityplatform/resource_identity_platform_tenant_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/plancheck"
78
"github.com/hashicorp/terraform-provider-google/google/acctest"
89
)
910

@@ -29,6 +30,11 @@ func TestAccIdentityPlatformTenant_identityPlatformTenantUpdate(t *testing.T) {
2930
},
3031
{
3132
Config: testAccIdentityPlatformTenant_identityPlatformTenantUpdate(context),
33+
ConfigPlanChecks: resource.ConfigPlanChecks{
34+
PreApply: []plancheck.PlanCheck{
35+
plancheck.ExpectResourceAction("google_identity_platform_tenant.tenant", plancheck.ResourceActionUpdate),
36+
},
37+
},
3238
},
3339
{
3440
ResourceName: "google_identity_platform_tenant.tenant",
@@ -55,6 +61,12 @@ resource "google_identity_platform_tenant" "tenant" {
5561
allow_password_signup = false
5662
enable_email_link_signin = true
5763
disable_auth = true
64+
client {
65+
permissions {
66+
disabled_user_signup = true
67+
disabled_user_deletion = true
68+
}
69+
}
5870
}
5971
`, context)
6072
}

0 commit comments

Comments
 (0)