diff --git a/build/inspec b/build/inspec index 5c56eff47b0c..7406de156265 160000 --- a/build/inspec +++ b/build/inspec @@ -1 +1 @@ -Subproject commit 5c56eff47b0c6c277a6858b9c43a532ae105eb0b +Subproject commit 7406de1562655e73222ee26d320ba098f260f233 diff --git a/build/terraform b/build/terraform index 8ee9fef85348..09520ea91516 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 8ee9fef853489afc60888de21c80205ea04f7aa0 +Subproject commit 09520ea9151642bbfdee535f60e60c3a5b92f74f diff --git a/build/terraform-beta b/build/terraform-beta index 54a6295408b2..7db486daa6ff 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 54a6295408b2d45bcb993aacc027e3a60f97589a +Subproject commit 7db486daa6ff1298c6757515f4fb9ac08e436c00 diff --git a/build/terraform-mapper b/build/terraform-mapper index 3014b4236b8d..e1348be83255 160000 --- a/build/terraform-mapper +++ b/build/terraform-mapper @@ -1 +1 @@ -Subproject commit 3014b4236b8d3e5a42cab64cdc18897daaf7a0ae +Subproject commit e1348be83255bb7e833d1320767a5ec8a6a818f2 diff --git a/products/identityplatform/api.yaml b/products/identityplatform/api.yaml index d5196ae6a85a..5dd4b828feb2 100644 --- a/products/identityplatform/api.yaml +++ b/products/identityplatform/api.yaml @@ -30,8 +30,8 @@ objects: - !ruby/object:Api::Resource name: 'DefaultSupportedIdpConfig' base_url: 'projects/{{project}}/defaultSupportedIdpConfigs' - self_link: 'projects/{{project}}/defaultSupportedIdpConfigs/{{client_id}}' - create_url: 'projects/{{project}}/defaultSupportedIdpConfigs?idpId={{client_id}}' + self_link: 'projects/{{project}}/defaultSupportedIdpConfigs/{{idp_id}}' + create_url: 'projects/{{project}}/defaultSupportedIdpConfigs?idpId={{idp_id}}' update_verb: :PATCH update_mask: true description: | @@ -46,11 +46,38 @@ objects: output: true description: | The name of the DefaultSupportedIdpConfig resource + - !ruby/object:Api::Type::String + name: 'idpId' + description: | + ID of the IDP. Possible values include: + + * `apple.com` + + * `facebook.com` + + * `gc.apple.com` + + * `github.com` + + * `google.com` + + * `linkedin.com` + + * `microsoft.com` + + * `playgames.google.com` + + * `twitter.com` + + * `yahoo.com` + + input: true + url_param_only: true + required: true - !ruby/object:Api::Type::String name: 'clientId' description: | OAuth client ID - input: true required: true - !ruby/object:Api::Type::String name: 'clientSecret' @@ -64,8 +91,8 @@ objects: - !ruby/object:Api::Resource name: 'TenantDefaultSupportedIdpConfig' base_url: 'projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs' - self_link: 'projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs/{{client_id}}' - create_url: 'projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs?idpId={{client_id}}' + self_link: 'projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs/{{idp_id}}' + create_url: 'projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs?idpId={{idp_id}}' update_verb: :PATCH update_mask: true description: | @@ -80,6 +107,34 @@ objects: output: true description: | The name of the default supported IDP config resource + - !ruby/object:Api::Type::String + name: 'idpId' + description: | + ID of the IDP. Possible values include: + + * `apple.com` + + * `facebook.com` + + * `gc.apple.com` + + * `github.com` + + * `google.com` + + * `linkedin.com` + + * `microsoft.com` + + * `playgames.google.com` + + * `twitter.com` + + * `yahoo.com` + + input: true + url_param_only: true + required: true - !ruby/object:Api::Type::String name: 'tenant' required: true @@ -89,7 +144,6 @@ objects: The name of the tenant where this DefaultSupportedIdpConfig resource exists - !ruby/object:Api::Type::String name: 'clientId' - input: true required: true description: | OAuth client ID diff --git a/products/identityplatform/terraform.yaml b/products/identityplatform/terraform.yaml index 1d0465ee5964..9fc0f2cdfb4d 100644 --- a/products/identityplatform/terraform.yaml +++ b/products/identityplatform/terraform.yaml @@ -14,7 +14,7 @@ --- !ruby/object:Provider::Terraform::Config overrides: !ruby/object:Overrides::ResourceOverrides DefaultSupportedIdpConfig: !ruby/object:Overrides::Terraform::ResourceOverride - import_format: ["projects/{{project}}/defaultSupportedIdpConfigs/{{client_id}}"] + import_format: ["projects/{{project}}/defaultSupportedIdpConfigs/{{idp_id}}"] examples: - !ruby/object:Provider::Terraform::Examples name: "identity_platform_default_supported_idp_config_basic" @@ -23,7 +23,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides # If we could spin up a project and enable identity platform we could test this separately skip_test: true TenantDefaultSupportedIdpConfig: !ruby/object:Overrides::Terraform::ResourceOverride - import_format: ["projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs/{{client_id}}"] + import_format: ["projects/{{project}}/tenants/{{tenant}}/defaultSupportedIdpConfigs/{{idp_id}}"] examples: - !ruby/object:Provider::Terraform::Examples name: "identity_platform_tenant_default_supported_idp_config_basic" diff --git a/templates/terraform/examples/identity_platform_default_supported_idp_config_basic.tf.erb b/templates/terraform/examples/identity_platform_default_supported_idp_config_basic.tf.erb index 2478397e260a..f6d290a32ae3 100644 --- a/templates/terraform/examples/identity_platform_default_supported_idp_config_basic.tf.erb +++ b/templates/terraform/examples/identity_platform_default_supported_idp_config_basic.tf.erb @@ -1,5 +1,6 @@ resource "google_identity_platform_default_supported_idp_config" "<%= ctx[:primary_resource_id] %>" { enabled = true - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "client-id" client_secret = "secret" } diff --git a/templates/terraform/examples/identity_platform_tenant_default_supported_idp_config_basic.tf.erb b/templates/terraform/examples/identity_platform_tenant_default_supported_idp_config_basic.tf.erb index 6a851a66cacb..291297fd5553 100644 --- a/templates/terraform/examples/identity_platform_tenant_default_supported_idp_config_basic.tf.erb +++ b/templates/terraform/examples/identity_platform_tenant_default_supported_idp_config_basic.tf.erb @@ -5,6 +5,7 @@ resource "google_identity_platform_tenant" "tenant" { resource "google_identity_platform_tenant_default_supported_idp_config" "<%= ctx[:primary_resource_id] %>" { enabled = true tenant = google_identity_platform_tenant.tenant.name - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "my-client-id" client_secret = "secret" } diff --git a/third_party/terraform/tests/resource_identity_platform_default_supported_idp_config_test.go b/third_party/terraform/tests/resource_identity_platform_default_supported_idp_config_test.go index de7da44b950b..177205352c92 100644 --- a/third_party/terraform/tests/resource_identity_platform_default_supported_idp_config_test.go +++ b/third_party/terraform/tests/resource_identity_platform_default_supported_idp_config_test.go @@ -71,7 +71,8 @@ func testAccIdentityPlatformDefaultSupportedIdpConfig_defaultSupportedIdpConfigB return Nprintf(` resource "google_identity_platform_default_supported_idp_config" "idp_config" { enabled = true - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "client-id" client_secret = "secret" } `, context) @@ -81,7 +82,8 @@ func testAccIdentityPlatformDefaultSupportedIdpConfig_defaultSupportedIdpConfigU return Nprintf(` resource "google_identity_platform_default_supported_idp_config" "idp_config" { enabled = false - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "client-id" client_secret = "anothersecret" } `, context) diff --git a/third_party/terraform/tests/resource_identity_platform_tenant_default_supported_idp_config_test.go b/third_party/terraform/tests/resource_identity_platform_tenant_default_supported_idp_config_test.go index 14177ebeade4..d2eceaea22bf 100644 --- a/third_party/terraform/tests/resource_identity_platform_tenant_default_supported_idp_config_test.go +++ b/third_party/terraform/tests/resource_identity_platform_tenant_default_supported_idp_config_test.go @@ -50,7 +50,8 @@ resource "google_identity_platform_tenant" "tenant" { resource "google_identity_platform_tenant_default_supported_idp_config" "idp_config" { enabled = true tenant = google_identity_platform_tenant.tenant.name - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "client-id" client_secret = "secret" } `, context) @@ -65,7 +66,8 @@ resource "google_identity_platform_tenant" "tenant" { resource "google_identity_platform_tenant_default_supported_idp_config" "idp_config" { enabled = false tenant = google_identity_platform_tenant.tenant.name - client_id = "playgames.google.com" + idp_id = "playgames.google.com" + client_id = "client-id2" client_secret = "differentsecret" } `, context)