published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Provides a Rancher OIDC Client. This can be used to configure the OIDC Clients Provides a Rancher OIDC Client. This can be used to configure the OIDC Clients available for the Rancher OIDC Provider.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 OIDC Client
const foo = new rancher2.OidcClient("foo", {
description: "Foo OIDC Client",
tokenExpirationSeconds: 600,
refreshTokenExpirationSeconds: 7200,
redirectUris: [
"http://127.0.0.1:5556/auth/rancher/callback",
"http://127.0.0.1:33418/",
"https://vscode.dev/redirect",
],
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 OIDC Client
foo = rancher2.OidcClient("foo",
description="Foo OIDC Client",
token_expiration_seconds=600,
refresh_token_expiration_seconds=7200,
redirect_uris=[
"http://127.0.0.1:5556/auth/rancher/callback",
"http://127.0.0.1:33418/",
"https://vscode.dev/redirect",
])
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v13/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new rancher2 OIDC Client
_, err := rancher2.NewOidcClient(ctx, "foo", &rancher2.OidcClientArgs{
Description: pulumi.String("Foo OIDC Client"),
TokenExpirationSeconds: pulumi.Int(600),
RefreshTokenExpirationSeconds: pulumi.Int(7200),
RedirectUris: pulumi.StringArray{
pulumi.String("http://127.0.0.1:5556/auth/rancher/callback"),
pulumi.String("http://127.0.0.1:33418/"),
pulumi.String("https://vscode.dev/redirect"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new rancher2 OIDC Client
var foo = new Rancher2.OidcClient("foo", new()
{
Description = "Foo OIDC Client",
TokenExpirationSeconds = 600,
RefreshTokenExpirationSeconds = 7200,
RedirectUris = new[]
{
"http://127.0.0.1:5556/auth/rancher/callback",
"http://127.0.0.1:33418/",
"https://vscode.dev/redirect",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.OidcClient;
import com.pulumi.rancher2.OidcClientArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
// Create a new rancher2 OIDC Client
var foo = new OidcClient("foo", OidcClientArgs.builder()
.description("Foo OIDC Client")
.tokenExpirationSeconds(600)
.refreshTokenExpirationSeconds(7200)
.redirectUris(
"http://127.0.0.1:5556/auth/rancher/callback",
"http://127.0.0.1:33418/",
"https://vscode.dev/redirect")
.build());
}
}
resources:
# Create a new rancher2 OIDC Client
foo:
type: rancher2:OidcClient
properties:
description: Foo OIDC Client
tokenExpirationSeconds: 600 # expiration of the id_token and access_token
refreshTokenExpirationSeconds: 7200 # expiration of the refresh_token
redirectUris:
- http://127.0.0.1:5556/auth/rancher/callback
- http://127.0.0.1:33418/
- https://vscode.dev/redirect
pulumi {
required_providers {
rancher2 = {
source = "pulumi/rancher2"
}
}
}
# Create a new rancher2 OIDC Client
resource "rancher2_oidcclient" "foo" {
description = "Foo OIDC Client"
token_expiration_seconds = 600 # expiration of the id_token and access_token
refresh_token_expiration_seconds = 7200 # expiration of the refresh_token
redirect_uris = ["http://127.0.0.1:5556/auth/rancher/callback", "http://127.0.0.1:33418/", "https://vscode.dev/redirect"]
}
Create OidcClient Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OidcClient(name: string, args: OidcClientArgs, opts?: CustomResourceOptions);@overload
def OidcClient(resource_name: str,
args: OidcClientArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OidcClient(resource_name: str,
opts: Optional[ResourceOptions] = None,
redirect_uris: Optional[Sequence[str]] = None,
annotations: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
refresh_token_expiration_seconds: Optional[int] = None,
token_expiration_seconds: Optional[int] = None)func NewOidcClient(ctx *Context, name string, args OidcClientArgs, opts ...ResourceOption) (*OidcClient, error)public OidcClient(string name, OidcClientArgs args, CustomResourceOptions? opts = null)
public OidcClient(String name, OidcClientArgs args)
public OidcClient(String name, OidcClientArgs args, CustomResourceOptions options)
type: rancher2:OidcClient
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "rancher2_oidc_client" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args OidcClientArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OidcClientArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OidcClientArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OidcClientArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OidcClientArgs
- 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 oidcClientResource = new Rancher2.OidcClient("oidcClientResource", new()
{
RedirectUris = new[]
{
"string",
},
Annotations =
{
{ "string", "string" },
},
Description = "string",
Labels =
{
{ "string", "string" },
},
RefreshTokenExpirationSeconds = 0,
TokenExpirationSeconds = 0,
});
example, err := rancher2.NewOidcClient(ctx, "oidcClientResource", &rancher2.OidcClientArgs{
RedirectUris: pulumi.StringArray{
pulumi.String("string"),
},
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
RefreshTokenExpirationSeconds: pulumi.Int(0),
TokenExpirationSeconds: pulumi.Int(0),
})
resource "rancher2_oidc_client" "oidcClientResource" {
lifecycle {
create_before_destroy = true
}
redirect_uris = ["string"]
annotations = {
"string" = "string"
}
description = "string"
labels = {
"string" = "string"
}
refresh_token_expiration_seconds = 0
token_expiration_seconds = 0
}
var oidcClientResource = new OidcClient("oidcClientResource", OidcClientArgs.builder()
.redirectUris("string")
.annotations(Map.of("string", "string"))
.description("string")
.labels(Map.of("string", "string"))
.refreshTokenExpirationSeconds(0)
.tokenExpirationSeconds(0)
.build());
oidc_client_resource = rancher2.OidcClient("oidcClientResource",
redirect_uris=["string"],
annotations={
"string": "string",
},
description="string",
labels={
"string": "string",
},
refresh_token_expiration_seconds=0,
token_expiration_seconds=0)
const oidcClientResource = new rancher2.OidcClient("oidcClientResource", {
redirectUris: ["string"],
annotations: {
string: "string",
},
description: "string",
labels: {
string: "string",
},
refreshTokenExpirationSeconds: 0,
tokenExpirationSeconds: 0,
});
type: rancher2:OidcClient
properties:
annotations:
string: string
description: string
labels:
string: string
redirectUris:
- string
refreshTokenExpirationSeconds: 0
tokenExpirationSeconds: 0
OidcClient 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 OidcClient resource accepts the following input properties:
- Redirect
Uris List<string> - List of allowed redirect URIs for this OIDC Client (list)
- Annotations Dictionary<string, string>
- Annotations for OIDC Client object (map)
- Description string
- A human-readable description for the OIDC Client (string)
- Labels Dictionary<string, string>
- Labels for OIDC Client object (map)
- Refresh
Token intExpiration Seconds - How long can the refresh token be used for (int)
- Token
Expiration intSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- Redirect
Uris []string - List of allowed redirect URIs for this OIDC Client (list)
- Annotations map[string]string
- Annotations for OIDC Client object (map)
- Description string
- A human-readable description for the OIDC Client (string)
- Labels map[string]string
- Labels for OIDC Client object (map)
- Refresh
Token intExpiration Seconds - How long can the refresh token be used for (int)
- Token
Expiration intSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- redirect_
uris list(string) - List of allowed redirect URIs for this OIDC Client (list)
- annotations map(string)
- Annotations for OIDC Client object (map)
- description string
- A human-readable description for the OIDC Client (string)
- labels map(string)
- Labels for OIDC Client object (map)
- refresh_
token_ numberexpiration_ seconds - How long can the refresh token be used for (int)
- token_
expiration_ numberseconds - ID Token and Access Token will only be valid for this many seconds (int)
- redirect
Uris List<String> - List of allowed redirect URIs for this OIDC Client (list)
- annotations Map<String,String>
- Annotations for OIDC Client object (map)
- description String
- A human-readable description for the OIDC Client (string)
- labels Map<String,String>
- Labels for OIDC Client object (map)
- refresh
Token IntegerExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration IntegerSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- redirect
Uris string[] - List of allowed redirect URIs for this OIDC Client (list)
- annotations {[key: string]: string}
- Annotations for OIDC Client object (map)
- description string
- A human-readable description for the OIDC Client (string)
- labels {[key: string]: string}
- Labels for OIDC Client object (map)
- refresh
Token numberExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration numberSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- redirect_
uris Sequence[str] - List of allowed redirect URIs for this OIDC Client (list)
- annotations Mapping[str, str]
- Annotations for OIDC Client object (map)
- description str
- A human-readable description for the OIDC Client (string)
- labels Mapping[str, str]
- Labels for OIDC Client object (map)
- refresh_
token_ intexpiration_ seconds - How long can the refresh token be used for (int)
- token_
expiration_ intseconds - ID Token and Access Token will only be valid for this many seconds (int)
- redirect
Uris List<String> - List of allowed redirect URIs for this OIDC Client (list)
- annotations Map<String>
- Annotations for OIDC Client object (map)
- description String
- A human-readable description for the OIDC Client (string)
- labels Map<String>
- Labels for OIDC Client object (map)
- refresh
Token NumberExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration NumberSeconds - ID Token and Access Token will only be valid for this many seconds (int)
Outputs
All input properties are implicitly available as output properties. Additionally, the OidcClient resource produces the following output properties:
- Client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- Client
Secret string - The Client Secret for OIDC Access.
- Id string
- The provider-assigned unique ID for this managed resource.
- Client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- Client
Secret string - The Client Secret for OIDC Access.
- Id string
- The provider-assigned unique ID for this managed resource.
- client_
id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- client_
secret string - The Client Secret for OIDC Access.
- id string
- The provider-assigned unique ID for this managed resource.
- client
Id String - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret String - The Client Secret for OIDC Access.
- id String
- The provider-assigned unique ID for this managed resource.
- client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret string - The Client Secret for OIDC Access.
- id string
- The provider-assigned unique ID for this managed resource.
- client_
id str - (Computed) The ID to be used when authenticating as this OIDC Client.
- client_
secret str - The Client Secret for OIDC Access.
- id str
- The provider-assigned unique ID for this managed resource.
- client
Id String - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret String - The Client Secret for OIDC Access.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing OidcClient Resource
Get an existing OidcClient 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?: OidcClientState, opts?: CustomResourceOptions): OidcClient@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
redirect_uris: Optional[Sequence[str]] = None,
refresh_token_expiration_seconds: Optional[int] = None,
token_expiration_seconds: Optional[int] = None) -> OidcClientfunc GetOidcClient(ctx *Context, name string, id IDInput, state *OidcClientState, opts ...ResourceOption) (*OidcClient, error)public static OidcClient Get(string name, Input<string> id, OidcClientState? state, CustomResourceOptions? opts = null)public static OidcClient get(String name, Output<String> id, OidcClientState state, CustomResourceOptions options)resources: _: type: rancher2:OidcClient get: id: ${id}import {
to = rancher2_oidc_client.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Annotations Dictionary<string, string>
- Annotations for OIDC Client object (map)
- Client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- Client
Secret string - The Client Secret for OIDC Access.
- Description string
- A human-readable description for the OIDC Client (string)
- Labels Dictionary<string, string>
- Labels for OIDC Client object (map)
- Redirect
Uris List<string> - List of allowed redirect URIs for this OIDC Client (list)
- Refresh
Token intExpiration Seconds - How long can the refresh token be used for (int)
- Token
Expiration intSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- Annotations map[string]string
- Annotations for OIDC Client object (map)
- Client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- Client
Secret string - The Client Secret for OIDC Access.
- Description string
- A human-readable description for the OIDC Client (string)
- Labels map[string]string
- Labels for OIDC Client object (map)
- Redirect
Uris []string - List of allowed redirect URIs for this OIDC Client (list)
- Refresh
Token intExpiration Seconds - How long can the refresh token be used for (int)
- Token
Expiration intSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- annotations map(string)
- Annotations for OIDC Client object (map)
- client_
id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- client_
secret string - The Client Secret for OIDC Access.
- description string
- A human-readable description for the OIDC Client (string)
- labels map(string)
- Labels for OIDC Client object (map)
- redirect_
uris list(string) - List of allowed redirect URIs for this OIDC Client (list)
- refresh_
token_ numberexpiration_ seconds - How long can the refresh token be used for (int)
- token_
expiration_ numberseconds - ID Token and Access Token will only be valid for this many seconds (int)
- annotations Map<String,String>
- Annotations for OIDC Client object (map)
- client
Id String - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret String - The Client Secret for OIDC Access.
- description String
- A human-readable description for the OIDC Client (string)
- labels Map<String,String>
- Labels for OIDC Client object (map)
- redirect
Uris List<String> - List of allowed redirect URIs for this OIDC Client (list)
- refresh
Token IntegerExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration IntegerSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- annotations {[key: string]: string}
- Annotations for OIDC Client object (map)
- client
Id string - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret string - The Client Secret for OIDC Access.
- description string
- A human-readable description for the OIDC Client (string)
- labels {[key: string]: string}
- Labels for OIDC Client object (map)
- redirect
Uris string[] - List of allowed redirect URIs for this OIDC Client (list)
- refresh
Token numberExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration numberSeconds - ID Token and Access Token will only be valid for this many seconds (int)
- annotations Mapping[str, str]
- Annotations for OIDC Client object (map)
- client_
id str - (Computed) The ID to be used when authenticating as this OIDC Client.
- client_
secret str - The Client Secret for OIDC Access.
- description str
- A human-readable description for the OIDC Client (string)
- labels Mapping[str, str]
- Labels for OIDC Client object (map)
- redirect_
uris Sequence[str] - List of allowed redirect URIs for this OIDC Client (list)
- refresh_
token_ intexpiration_ seconds - How long can the refresh token be used for (int)
- token_
expiration_ intseconds - ID Token and Access Token will only be valid for this many seconds (int)
- annotations Map<String>
- Annotations for OIDC Client object (map)
- client
Id String - (Computed) The ID to be used when authenticating as this OIDC Client.
- client
Secret String - The Client Secret for OIDC Access.
- description String
- A human-readable description for the OIDC Client (string)
- labels Map<String>
- Labels for OIDC Client object (map)
- redirect
Uris List<String> - List of allowed redirect URIs for this OIDC Client (list)
- refresh
Token NumberExpiration Seconds - How long can the refresh token be used for (int)
- token
Expiration NumberSeconds - ID Token and Access Token will only be valid for this many seconds (int)
Import
OIDC Clients can be imported using the Client name in the format <client_name>
$ pulumi import rancher2:index/oidcClient:OidcClient foo <client_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2Terraform Provider.
published on Thursday, Sep 17, 2026 by Pulumi