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 new Config entity to Identitytoolkit #6587

Merged
merged 1 commit into from
Sep 27, 2022
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
30 changes: 30 additions & 0 deletions mmv1/products/identityplatform/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,36 @@ apis_required:
name: Google Identity Platform
url: https://console.cloud.google.com/marketplace/details/google-cloud-platform/customer-identity/
objects:
- !ruby/object:Api::Resource
name: 'Config'
base_url: 'projects/{{project}}/config'
self_link: 'projects/{{project}}/config'
create_url: 'projects/{{project}}/identityPlatform:initializeAuth'
update_verb: :PATCH
update_mask: true
description: |
Identity Platform configuration for a Cloud project. Identity Platform is an
end-to-end authentication system for third-party users to access apps
and services.

This entity is created only once during intialization and cannot be deleted,
individual Identity Providers may be disabled instead. This resource may only
be created in billing-enabled projects.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
'https://cloud.google.com/identity-platform/docs'
api: 'https://cloud.google.com/identity-platform/docs/reference/rest/v2/Config'
properties:
- !ruby/object:Api::Type::String
name: 'name'
output: true
description: |
The name of the Config resource
- !ruby/object:Api::Type::Boolean
name: 'autodeleteAnonymousUsers'
description: |
Whether anonymous users will be auto-deleted after a period of 30 days
- !ruby/object:Api::Resource
name: 'DefaultSupportedIdpConfig'
base_url: 'projects/{{project}}/defaultSupportedIdpConfigs'
Expand Down
15 changes: 15 additions & 0 deletions mmv1/products/identityplatform/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@

--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Config: !ruby/object:Overrides::Terraform::ResourceOverride
import_format: ["projects/{{project}}/config", "projects/{{project}}", "{{project}}"]
skip_delete: true
skip_sweeper: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: "identity_platform_config_basic"
primary_resource_id: "default"
vars:
instance_name: "memory-cache"
test_env_vars:
org_id: :ORG_ID
billing_acct: :BILLING_ACCT
# Resource creation race
skip_vcr: true
DefaultSupportedIdpConfig: !ruby/object:Overrides::Terraform::ResourceOverride
import_format: ["projects/{{project}}/defaultSupportedIdpConfigs/{{idp_id}}"]
examples:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "google_project" "default" {
project_id = "tf-test%{random_suffix}"
name = "tf-test%{random_suffix}"
org_id = "<%= ctx[:test_env_vars]['org_id'] %>"
billing_account = "<%= ctx[:test_env_vars]['billing_acct'] -%>"
}

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


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