1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. identityplatform
  5. OauthIdpConfig
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.identityplatform.OauthIdpConfig

Explore with Pulumi AI

OIDC IdP configuration for a Identity Toolkit project.

You must enable the Google Identity Platform in the marketplace prior to using this resource.

Example Usage

Identity Platform Oauth Idp Config Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const oauthIdpConfig = new gcp.identityplatform.OauthIdpConfig("oauth_idp_config", {
    name: "oidc.oauth-idp-config",
    displayName: "Display Name",
    clientId: "client-id",
    issuer: "issuer",
    enabled: true,
    clientSecret: "secret",
});
Copy
import pulumi
import pulumi_gcp as gcp

oauth_idp_config = gcp.identityplatform.OauthIdpConfig("oauth_idp_config",
    name="oidc.oauth-idp-config",
    display_name="Display Name",
    client_id="client-id",
    issuer="issuer",
    enabled=True,
    client_secret="secret")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/identityplatform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identityplatform.NewOauthIdpConfig(ctx, "oauth_idp_config", &identityplatform.OauthIdpConfigArgs{
			Name:         pulumi.String("oidc.oauth-idp-config"),
			DisplayName:  pulumi.String("Display Name"),
			ClientId:     pulumi.String("client-id"),
			Issuer:       pulumi.String("issuer"),
			Enabled:      pulumi.Bool(true),
			ClientSecret: pulumi.String("secret"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var oauthIdpConfig = new Gcp.IdentityPlatform.OauthIdpConfig("oauth_idp_config", new()
    {
        Name = "oidc.oauth-idp-config",
        DisplayName = "Display Name",
        ClientId = "client-id",
        Issuer = "issuer",
        Enabled = true,
        ClientSecret = "secret",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.identityplatform.OauthIdpConfig;
import com.pulumi.gcp.identityplatform.OauthIdpConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var oauthIdpConfig = new OauthIdpConfig("oauthIdpConfig", OauthIdpConfigArgs.builder()
            .name("oidc.oauth-idp-config")
            .displayName("Display Name")
            .clientId("client-id")
            .issuer("issuer")
            .enabled(true)
            .clientSecret("secret")
            .build());

    }
}
Copy
resources:
  oauthIdpConfig:
    type: gcp:identityplatform:OauthIdpConfig
    name: oauth_idp_config
    properties:
      name: oidc.oauth-idp-config
      displayName: Display Name
      clientId: client-id
      issuer: issuer
      enabled: true
      clientSecret: secret
Copy

Create OauthIdpConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new OauthIdpConfig(name: string, args: OauthIdpConfigArgs, opts?: CustomResourceOptions);
@overload
def OauthIdpConfig(resource_name: str,
                   args: OauthIdpConfigArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def OauthIdpConfig(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   client_id: Optional[str] = None,
                   issuer: Optional[str] = None,
                   client_secret: Optional[str] = None,
                   display_name: Optional[str] = None,
                   enabled: Optional[bool] = None,
                   name: Optional[str] = None,
                   project: Optional[str] = None)
func NewOauthIdpConfig(ctx *Context, name string, args OauthIdpConfigArgs, opts ...ResourceOption) (*OauthIdpConfig, error)
public OauthIdpConfig(string name, OauthIdpConfigArgs args, CustomResourceOptions? opts = null)
public OauthIdpConfig(String name, OauthIdpConfigArgs args)
public OauthIdpConfig(String name, OauthIdpConfigArgs args, CustomResourceOptions options)
type: gcp:identityplatform:OauthIdpConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OauthIdpConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OauthIdpConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OauthIdpConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OauthIdpConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OauthIdpConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var oauthIdpConfigResource = new Gcp.IdentityPlatform.OauthIdpConfig("oauthIdpConfigResource", new()
{
    ClientId = "string",
    Issuer = "string",
    ClientSecret = "string",
    DisplayName = "string",
    Enabled = false,
    Name = "string",
    Project = "string",
});
Copy
example, err := identityplatform.NewOauthIdpConfig(ctx, "oauthIdpConfigResource", &identityplatform.OauthIdpConfigArgs{
	ClientId:     pulumi.String("string"),
	Issuer:       pulumi.String("string"),
	ClientSecret: pulumi.String("string"),
	DisplayName:  pulumi.String("string"),
	Enabled:      pulumi.Bool(false),
	Name:         pulumi.String("string"),
	Project:      pulumi.String("string"),
})
Copy
var oauthIdpConfigResource = new OauthIdpConfig("oauthIdpConfigResource", OauthIdpConfigArgs.builder()
    .clientId("string")
    .issuer("string")
    .clientSecret("string")
    .displayName("string")
    .enabled(false)
    .name("string")
    .project("string")
    .build());
Copy
oauth_idp_config_resource = gcp.identityplatform.OauthIdpConfig("oauthIdpConfigResource",
    client_id="string",
    issuer="string",
    client_secret="string",
    display_name="string",
    enabled=False,
    name="string",
    project="string")
Copy
const oauthIdpConfigResource = new gcp.identityplatform.OauthIdpConfig("oauthIdpConfigResource", {
    clientId: "string",
    issuer: "string",
    clientSecret: "string",
    displayName: "string",
    enabled: false,
    name: "string",
    project: "string",
});
Copy
type: gcp:identityplatform:OauthIdpConfig
properties:
    clientId: string
    clientSecret: string
    displayName: string
    enabled: false
    issuer: string
    name: string
    project: string
Copy

OauthIdpConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The OauthIdpConfig resource accepts the following input properties:

ClientId This property is required. string
The client id of an OAuth client.


Issuer This property is required. string
For OIDC Idps, the issuer identifier.
ClientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
DisplayName string
Human friendly display name.
Enabled bool
If this config allows users to sign in with the provider.
Name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ClientId This property is required. string
The client id of an OAuth client.


Issuer This property is required. string
For OIDC Idps, the issuer identifier.
ClientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
DisplayName string
Human friendly display name.
Enabled bool
If this config allows users to sign in with the provider.
Name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId This property is required. String
The client id of an OAuth client.


issuer This property is required. String
For OIDC Idps, the issuer identifier.
clientSecret String
The client secret of the OAuth client, to enable OIDC code flow.
displayName String
Human friendly display name.
enabled Boolean
If this config allows users to sign in with the provider.
name Changes to this property will trigger replacement. String
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId This property is required. string
The client id of an OAuth client.


issuer This property is required. string
For OIDC Idps, the issuer identifier.
clientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
displayName string
Human friendly display name.
enabled boolean
If this config allows users to sign in with the provider.
name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
client_id This property is required. str
The client id of an OAuth client.


issuer This property is required. str
For OIDC Idps, the issuer identifier.
client_secret str
The client secret of the OAuth client, to enable OIDC code flow.
display_name str
Human friendly display name.
enabled bool
If this config allows users to sign in with the provider.
name Changes to this property will trigger replacement. str
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId This property is required. String
The client id of an OAuth client.


issuer This property is required. String
For OIDC Idps, the issuer identifier.
clientSecret String
The client secret of the OAuth client, to enable OIDC code flow.
displayName String
Human friendly display name.
enabled Boolean
If this config allows users to sign in with the provider.
name Changes to this property will trigger replacement. String
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the OauthIdpConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing OauthIdpConfig Resource

Get an existing OauthIdpConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OauthIdpConfigState, opts?: CustomResourceOptions): OauthIdpConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_id: Optional[str] = None,
        client_secret: Optional[str] = None,
        display_name: Optional[str] = None,
        enabled: Optional[bool] = None,
        issuer: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None) -> OauthIdpConfig
func GetOauthIdpConfig(ctx *Context, name string, id IDInput, state *OauthIdpConfigState, opts ...ResourceOption) (*OauthIdpConfig, error)
public static OauthIdpConfig Get(string name, Input<string> id, OauthIdpConfigState? state, CustomResourceOptions? opts = null)
public static OauthIdpConfig get(String name, Output<String> id, OauthIdpConfigState state, CustomResourceOptions options)
resources:  _:    type: gcp:identityplatform:OauthIdpConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ClientId string
The client id of an OAuth client.


ClientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
DisplayName string
Human friendly display name.
Enabled bool
If this config allows users to sign in with the provider.
Issuer string
For OIDC Idps, the issuer identifier.
Name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ClientId string
The client id of an OAuth client.


ClientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
DisplayName string
Human friendly display name.
Enabled bool
If this config allows users to sign in with the provider.
Issuer string
For OIDC Idps, the issuer identifier.
Name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId String
The client id of an OAuth client.


clientSecret String
The client secret of the OAuth client, to enable OIDC code flow.
displayName String
Human friendly display name.
enabled Boolean
If this config allows users to sign in with the provider.
issuer String
For OIDC Idps, the issuer identifier.
name Changes to this property will trigger replacement. String
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId string
The client id of an OAuth client.


clientSecret string
The client secret of the OAuth client, to enable OIDC code flow.
displayName string
Human friendly display name.
enabled boolean
If this config allows users to sign in with the provider.
issuer string
For OIDC Idps, the issuer identifier.
name Changes to this property will trigger replacement. string
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
client_id str
The client id of an OAuth client.


client_secret str
The client secret of the OAuth client, to enable OIDC code flow.
display_name str
Human friendly display name.
enabled bool
If this config allows users to sign in with the provider.
issuer str
For OIDC Idps, the issuer identifier.
name Changes to this property will trigger replacement. str
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
clientId String
The client id of an OAuth client.


clientSecret String
The client secret of the OAuth client, to enable OIDC code flow.
displayName String
Human friendly display name.
enabled Boolean
If this config allows users to sign in with the provider.
issuer String
For OIDC Idps, the issuer identifier.
name Changes to this property will trigger replacement. String
The name of the OauthIdpConfig. Must start with oidc..
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Import

OauthIdpConfig can be imported using any of these accepted formats:

  • projects/{{project}}/oauthIdpConfigs/{{name}}

  • {{project}}/{{name}}

  • {{name}}

When using the pulumi import command, OauthIdpConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default projects/{{project}}/oauthIdpConfigs/{{name}}
Copy
$ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default {{project}}/{{name}}
Copy
$ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default {{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.