Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BlockingFunctionsConfig, RecaptchaConfig and QuotaConfig fields to identityplatform config #15325

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/8402.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
identityplayform: added support for `blocking_functions` `quota` and `authorized_domains` in `google_identity_platform_config`
```
31 changes: 28 additions & 3 deletions google/resource_identity_platform_config_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package google

import (
"testing"
"time"

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

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

context := map[string]interface{}{
"org_id": envvar.GetTestOrgFromEnv(t),
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
"random_suffix": acctest.RandString(t, 10),
"org_id": envvar.GetTestOrgFromEnv(t),
"billing_acct": envvar.GetTestBillingAccountFromEnv(t),
"quota_start_time": time.Now().AddDate(0, 0, 1).Format(time.RFC3339),
"random_suffix": acctest.RandString(t, 10),
}

acctest.VcrTest(t, resource.TestCase{
Expand Down Expand Up @@ -73,6 +75,29 @@ resource "google_project_service" "identitytoolkit" {
resource "google_identity_platform_config" "default" {
project = google_project.default.project_id
autodelete_anonymous_users = true
blocking_functions {
triggers {
event_type = "beforeSignIn"
function_uri = "https://us-east1-tf-test-my-project%{random_suffix}.cloudfunctions.net/before-sign-in"
}
forward_inbound_credentials {
refresh_token = true
access_token = true
id_token = true
}
}
quota {
sign_up_quota_config {
quota = 1000
start_time = "%{quota_start_time}"
quota_duration = "7200s"
}
}
authorized_domains = [
"localhost",
"tf-test-my-project%{random_suffix}.firebaseapp.com",
"tf-test-my-project%{random_suffix}.web.app",
]
}
`, context)
}
Loading