Skip to content

Commit

Permalink
make authorized_domains O+C and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyama1 committed Aug 23, 2023
1 parent af36414 commit 412b95f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mmv1/products/identityplatform/Config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ examples:
# Set quota start time for the following day.
quota_start_time: 'time.Now().AddDate(0, 0, 1).Format(time.RFC3339)'
skip_vcr: true
- !ruby/object:Provider::Terraform::Examples
name: 'identity_platform_config_minimal'
primary_resource_id: 'default'
vars:
project_id: 'my-project-1'
test_env_vars:
org_id: :ORG_ID
billing_acct:
:BILLING_ACCT
skip_vcr: true
skip_docs: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_create: 'templates/terraform/custom_create/identity_platform_config.go'
properties:
Expand Down Expand Up @@ -129,4 +140,4 @@ properties:
description: |
List of domains authorized for OAuth redirects.
item_type: Api::Type::String
# default_from_api: true
default_from_api: true
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@ resource "google_identity_platform_config" "default" {
quota_duration = "7200s"
}
}
authorized_domains = [
"localhost",
"<%= ctx[:vars]['project_id'] %>.firebaseapp.com",
"<%= ctx[:vars]['project_id'] %>.web.app",
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "google_project" "default" {
project_id = "<%= ctx[:vars]['project_id'] %>"
name = "<%= ctx[:vars]['project_id'] %>"
org_id = "<%= ctx[:test_env_vars]['org_id'] %>"
billing_account = "<%= ctx[:test_env_vars]['billing_acct'] -%>"
labels = {
firebase = "enabled"
}
}

resource "google_project_service" "identitytoolkit" {
project = google_project.default.project_id
service = "identitytoolkit.googleapis.com"
}


resource "google_identity_platform_config" "default" {
project = google_project.default.project_id
}

0 comments on commit 412b95f

Please sign in to comment.