Skip to content

Commit c649ca8

Browse files
Add BlockingFunctionsConfig, RecaptchaConfig and QuotaConfig fields to identityplatform config (#8402) (#15325)
* Add Add BlockingFunctionsConfig, AuthorizedDomains and QuotaConfig fields to Config.yaml * adding new fields to identity_platform_config_basic.tf.erb * Update Config.yaml Temporarily enable VCR to run the tests. Also, provide a more user's friendly desc for the quota field. * Fix the failing test * Update Config.yaml Fix the quota start_time format. * Attempt 2: Fix the failing test * Update Config.yaml Enabling VCR. * Update Config.yaml Re-enable skip_vcr due to #14158. Signed-off-by: Modular Magician <[email protected]>
1 parent 45d6cab commit c649ca8

File tree

4 files changed

+575
-3
lines changed

4 files changed

+575
-3
lines changed

.changelog/8402.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
identityplayform: added support for `blocking_functions` `quota` and `authorized_domains` in `google_identity_platform_config`
3+
```

google/resource_identity_platform_config_generated_test.go

+28-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google
1919

2020
import (
2121
"testing"
22+
"time"
2223

2324
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
2425

@@ -31,9 +32,10 @@ func TestAccIdentityPlatformConfig_identityPlatformConfigBasicExample(t *testing
3132
t.Parallel()
3233

3334
context := map[string]interface{}{
34-
"org_id": envvar.GetTestOrgFromEnv(t),
35-
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
36-
"random_suffix": acctest.RandString(t, 10),
35+
"org_id": envvar.GetTestOrgFromEnv(t),
36+
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
37+
"quota_start_time": time.Now().AddDate(0, 0, 1).Format(time.RFC3339),
38+
"random_suffix": acctest.RandString(t, 10),
3739
}
3840

3941
acctest.VcrTest(t, resource.TestCase{
@@ -73,6 +75,29 @@ resource "google_project_service" "identitytoolkit" {
7375
resource "google_identity_platform_config" "default" {
7476
project = google_project.default.project_id
7577
autodelete_anonymous_users = true
78+
blocking_functions {
79+
triggers {
80+
event_type = "beforeSignIn"
81+
function_uri = "https://us-east1-tf-test-my-project%{random_suffix}.cloudfunctions.net/before-sign-in"
82+
}
83+
forward_inbound_credentials {
84+
refresh_token = true
85+
access_token = true
86+
id_token = true
87+
}
88+
}
89+
quota {
90+
sign_up_quota_config {
91+
quota = 1000
92+
start_time = "%{quota_start_time}"
93+
quota_duration = "7200s"
94+
}
95+
}
96+
authorized_domains = [
97+
"localhost",
98+
"tf-test-my-project%{random_suffix}.firebaseapp.com",
99+
"tf-test-my-project%{random_suffix}.web.app",
100+
]
76101
}
77102
`, context)
78103
}

0 commit comments

Comments
 (0)