4
4
"testing"
5
5
6
6
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
7
+ "github.com/hashicorp/terraform-plugin-testing/plancheck"
7
8
"github.com/hashicorp/terraform-provider-google/google/acctest"
8
9
)
9
10
@@ -29,6 +30,19 @@ func TestAccIdentityPlatformTenant_identityPlatformTenantUpdate(t *testing.T) {
29
30
},
30
31
{
31
32
Config : testAccIdentityPlatformTenant_identityPlatformTenantUpdate (context ),
33
+ ConfigPlanChecks : resource.ConfigPlanChecks {
34
+ PreApply : []plancheck.PlanCheck {
35
+ plancheck .ExpectResourceAction ("google_identity_platform_tenant.tenant" , plancheck .ResourceActionUpdate ),
36
+ },
37
+ },
38
+ Check : resource .ComposeTestCheckFunc (
39
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "display_name" , "my-tenant" ),
40
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "allow_password_signup" , "false" ),
41
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "enable_email_link_signin" , "true" ),
42
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "disable_auth" , "true" ),
43
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "client.0.permissions.0.disabled_user_signup" , "true" ),
44
+ resource .TestCheckResourceAttr ("google_identity_platform_tenant.tenant" , "client.0.permissions.0.disabled_user_deletion" , "true" ),
45
+ ),
32
46
},
33
47
{
34
48
ResourceName : "google_identity_platform_tenant.tenant" ,
@@ -55,6 +69,12 @@ resource "google_identity_platform_tenant" "tenant" {
55
69
allow_password_signup = false
56
70
enable_email_link_signin = true
57
71
disable_auth = true
72
+ client {
73
+ permissions {
74
+ disabled_user_signup = true
75
+ disabled_user_deletion = true
76
+ }
77
+ }
58
78
}
59
79
` , context )
60
80
}
0 commit comments