1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ims
  5. OidcProvider
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ims.OidcProvider

Explore with Pulumi AI

Provides a IMS Oidc Provider resource.

OpenID Connect Provider.

For information about IMS Oidc Provider and how to use it, see What is Oidc Provider.

NOTE: Available since v1.210.0.

Example Usage

Basic Usage

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

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const oidcProviderName = config.get("oidcProviderName") || "amp-resource-example-oidc-provider";
const _default = new alicloud.ims.OidcProvider("default", {
    description: oidcProviderName,
    issuerUrl: "https://oauth.aliyun.com",
    fingerprints: ["902ef2deeb3c5b13ea4c3d5193629309e231ae55"],
    issuanceLimitTime: 12,
    oidcProviderName: name,
    clientIds: [
        "123",
        "456",
    ],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
oidc_provider_name = config.get("oidcProviderName")
if oidc_provider_name is None:
    oidc_provider_name = "amp-resource-example-oidc-provider"
default = alicloud.ims.OidcProvider("default",
    description=oidc_provider_name,
    issuer_url="https://oauth.aliyun.com",
    fingerprints=["902ef2deeb3c5b13ea4c3d5193629309e231ae55"],
    issuance_limit_time=12,
    oidc_provider_name=name,
    client_ids=[
        "123",
        "456",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ims"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		oidcProviderName := "amp-resource-example-oidc-provider"
		if param := cfg.Get("oidcProviderName"); param != "" {
			oidcProviderName = param
		}
		_, err := ims.NewOidcProvider(ctx, "default", &ims.OidcProviderArgs{
			Description: pulumi.String(oidcProviderName),
			IssuerUrl:   pulumi.String("https://oauth.aliyun.com"),
			Fingerprints: pulumi.StringArray{
				pulumi.String("902ef2deeb3c5b13ea4c3d5193629309e231ae55"),
			},
			IssuanceLimitTime: pulumi.Int(12),
			OidcProviderName:  pulumi.String(name),
			ClientIds: pulumi.StringArray{
				pulumi.String("123"),
				pulumi.String("456"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var oidcProviderName = config.Get("oidcProviderName") ?? "amp-resource-example-oidc-provider";
    var @default = new AliCloud.Ims.OidcProvider("default", new()
    {
        Description = oidcProviderName,
        IssuerUrl = "https://oauth.aliyun.com",
        Fingerprints = new[]
        {
            "902ef2deeb3c5b13ea4c3d5193629309e231ae55",
        },
        IssuanceLimitTime = 12,
        OidcProviderName = name,
        ClientIds = new[]
        {
            "123",
            "456",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ims.OidcProvider;
import com.pulumi.alicloud.ims.OidcProviderArgs;
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) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var oidcProviderName = config.get("oidcProviderName").orElse("amp-resource-example-oidc-provider");
        var default_ = new OidcProvider("default", OidcProviderArgs.builder()
            .description(oidcProviderName)
            .issuerUrl("https://oauth.aliyun.com")
            .fingerprints("902ef2deeb3c5b13ea4c3d5193629309e231ae55")
            .issuanceLimitTime("12")
            .oidcProviderName(name)
            .clientIds(            
                "123",
                "456")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
  oidcProviderName:
    type: string
    default: amp-resource-example-oidc-provider
resources:
  default:
    type: alicloud:ims:OidcProvider
    properties:
      description: ${oidcProviderName}
      issuerUrl: https://oauth.aliyun.com
      fingerprints:
        - 902ef2deeb3c5b13ea4c3d5193629309e231ae55
      issuanceLimitTime: '12'
      oidcProviderName: ${name}
      clientIds:
        - '123'
        - '456'
Copy

Create OidcProvider Resource

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

Constructor syntax

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

@overload
def OidcProvider(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 issuer_url: Optional[str] = None,
                 oidc_provider_name: Optional[str] = None,
                 client_ids: Optional[Sequence[str]] = None,
                 description: Optional[str] = None,
                 fingerprints: Optional[Sequence[str]] = None,
                 issuance_limit_time: Optional[int] = None)
func NewOidcProvider(ctx *Context, name string, args OidcProviderArgs, opts ...ResourceOption) (*OidcProvider, error)
public OidcProvider(string name, OidcProviderArgs args, CustomResourceOptions? opts = null)
public OidcProvider(String name, OidcProviderArgs args)
public OidcProvider(String name, OidcProviderArgs args, CustomResourceOptions options)
type: alicloud:ims:OidcProvider
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. OidcProviderArgs
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. OidcProviderArgs
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. OidcProviderArgs
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. OidcProviderArgs
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. OidcProviderArgs
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 oidcProviderResource = new AliCloud.Ims.OidcProvider("oidcProviderResource", new()
{
    IssuerUrl = "string",
    OidcProviderName = "string",
    ClientIds = new[]
    {
        "string",
    },
    Description = "string",
    Fingerprints = new[]
    {
        "string",
    },
    IssuanceLimitTime = 0,
});
Copy
example, err := ims.NewOidcProvider(ctx, "oidcProviderResource", &ims.OidcProviderArgs{
	IssuerUrl:        pulumi.String("string"),
	OidcProviderName: pulumi.String("string"),
	ClientIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Fingerprints: pulumi.StringArray{
		pulumi.String("string"),
	},
	IssuanceLimitTime: pulumi.Int(0),
})
Copy
var oidcProviderResource = new OidcProvider("oidcProviderResource", OidcProviderArgs.builder()
    .issuerUrl("string")
    .oidcProviderName("string")
    .clientIds("string")
    .description("string")
    .fingerprints("string")
    .issuanceLimitTime(0)
    .build());
Copy
oidc_provider_resource = alicloud.ims.OidcProvider("oidcProviderResource",
    issuer_url="string",
    oidc_provider_name="string",
    client_ids=["string"],
    description="string",
    fingerprints=["string"],
    issuance_limit_time=0)
Copy
const oidcProviderResource = new alicloud.ims.OidcProvider("oidcProviderResource", {
    issuerUrl: "string",
    oidcProviderName: "string",
    clientIds: ["string"],
    description: "string",
    fingerprints: ["string"],
    issuanceLimitTime: 0,
});
Copy
type: alicloud:ims:OidcProvider
properties:
    clientIds:
        - string
    description: string
    fingerprints:
        - string
    issuanceLimitTime: 0
    issuerUrl: string
    oidcProviderName: string
Copy

OidcProvider 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 OidcProvider resource accepts the following input properties:

IssuerUrl
This property is required.
Changes to this property will trigger replacement.
string
The issuer URL of the OIDC identity provider.
OidcProviderName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OIDC identity provider.
ClientIds List<string>
Client ID.
Description string
Description of OIDC identity provider.
Fingerprints List<string>
The authentication fingerprint of the HTTPS CA certificate.
IssuanceLimitTime int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
IssuerUrl
This property is required.
Changes to this property will trigger replacement.
string
The issuer URL of the OIDC identity provider.
OidcProviderName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OIDC identity provider.
ClientIds []string
Client ID.
Description string
Description of OIDC identity provider.
Fingerprints []string
The authentication fingerprint of the HTTPS CA certificate.
IssuanceLimitTime int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl
This property is required.
Changes to this property will trigger replacement.
String
The issuer URL of the OIDC identity provider.
oidcProviderName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OIDC identity provider.
clientIds List<String>
Client ID.
description String
Description of OIDC identity provider.
fingerprints List<String>
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime Integer
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl
This property is required.
Changes to this property will trigger replacement.
string
The issuer URL of the OIDC identity provider.
oidcProviderName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OIDC identity provider.
clientIds string[]
Client ID.
description string
Description of OIDC identity provider.
fingerprints string[]
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime number
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuer_url
This property is required.
Changes to this property will trigger replacement.
str
The issuer URL of the OIDC identity provider.
oidc_provider_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the OIDC identity provider.
client_ids Sequence[str]
Client ID.
description str
Description of OIDC identity provider.
fingerprints Sequence[str]
The authentication fingerprint of the HTTPS CA certificate.
issuance_limit_time int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl
This property is required.
Changes to this property will trigger replacement.
String
The issuer URL of the OIDC identity provider.
oidcProviderName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OIDC identity provider.
clientIds List<String>
Client ID.
description String
Description of OIDC identity provider.
fingerprints List<String>
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime Number
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.

Outputs

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

Arn string
ARN of OIDC identity provider.
CreateTime string
Creation Time (UTC time).
Id string
The provider-assigned unique ID for this managed resource.
Arn string
ARN of OIDC identity provider.
CreateTime string
Creation Time (UTC time).
Id string
The provider-assigned unique ID for this managed resource.
arn String
ARN of OIDC identity provider.
createTime String
Creation Time (UTC time).
id String
The provider-assigned unique ID for this managed resource.
arn string
ARN of OIDC identity provider.
createTime string
Creation Time (UTC time).
id string
The provider-assigned unique ID for this managed resource.
arn str
ARN of OIDC identity provider.
create_time str
Creation Time (UTC time).
id str
The provider-assigned unique ID for this managed resource.
arn String
ARN of OIDC identity provider.
createTime String
Creation Time (UTC time).
id String
The provider-assigned unique ID for this managed resource.

Look up Existing OidcProvider Resource

Get an existing OidcProvider 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?: OidcProviderState, opts?: CustomResourceOptions): OidcProvider
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        client_ids: Optional[Sequence[str]] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        fingerprints: Optional[Sequence[str]] = None,
        issuance_limit_time: Optional[int] = None,
        issuer_url: Optional[str] = None,
        oidc_provider_name: Optional[str] = None) -> OidcProvider
func GetOidcProvider(ctx *Context, name string, id IDInput, state *OidcProviderState, opts ...ResourceOption) (*OidcProvider, error)
public static OidcProvider Get(string name, Input<string> id, OidcProviderState? state, CustomResourceOptions? opts = null)
public static OidcProvider get(String name, Output<String> id, OidcProviderState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ims:OidcProvider    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:
Arn string
ARN of OIDC identity provider.
ClientIds List<string>
Client ID.
CreateTime string
Creation Time (UTC time).
Description string
Description of OIDC identity provider.
Fingerprints List<string>
The authentication fingerprint of the HTTPS CA certificate.
IssuanceLimitTime int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
IssuerUrl Changes to this property will trigger replacement. string
The issuer URL of the OIDC identity provider.
OidcProviderName Changes to this property will trigger replacement. string
The name of the OIDC identity provider.
Arn string
ARN of OIDC identity provider.
ClientIds []string
Client ID.
CreateTime string
Creation Time (UTC time).
Description string
Description of OIDC identity provider.
Fingerprints []string
The authentication fingerprint of the HTTPS CA certificate.
IssuanceLimitTime int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
IssuerUrl Changes to this property will trigger replacement. string
The issuer URL of the OIDC identity provider.
OidcProviderName Changes to this property will trigger replacement. string
The name of the OIDC identity provider.
arn String
ARN of OIDC identity provider.
clientIds List<String>
Client ID.
createTime String
Creation Time (UTC time).
description String
Description of OIDC identity provider.
fingerprints List<String>
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime Integer
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl Changes to this property will trigger replacement. String
The issuer URL of the OIDC identity provider.
oidcProviderName Changes to this property will trigger replacement. String
The name of the OIDC identity provider.
arn string
ARN of OIDC identity provider.
clientIds string[]
Client ID.
createTime string
Creation Time (UTC time).
description string
Description of OIDC identity provider.
fingerprints string[]
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime number
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl Changes to this property will trigger replacement. string
The issuer URL of the OIDC identity provider.
oidcProviderName Changes to this property will trigger replacement. string
The name of the OIDC identity provider.
arn str
ARN of OIDC identity provider.
client_ids Sequence[str]
Client ID.
create_time str
Creation Time (UTC time).
description str
Description of OIDC identity provider.
fingerprints Sequence[str]
The authentication fingerprint of the HTTPS CA certificate.
issuance_limit_time int
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuer_url Changes to this property will trigger replacement. str
The issuer URL of the OIDC identity provider.
oidc_provider_name Changes to this property will trigger replacement. str
The name of the OIDC identity provider.
arn String
ARN of OIDC identity provider.
clientIds List<String>
Client ID.
createTime String
Creation Time (UTC time).
description String
Description of OIDC identity provider.
fingerprints List<String>
The authentication fingerprint of the HTTPS CA certificate.
issuanceLimitTime Number
The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected. Unit: hours. Value range: 1~168.
issuerUrl Changes to this property will trigger replacement. String
The issuer URL of the OIDC identity provider.
oidcProviderName Changes to this property will trigger replacement. String
The name of the OIDC identity provider.

Import

IMS Oidc Provider can be imported using the id, e.g.

$ pulumi import alicloud:ims/oidcProvider:OidcProvider example <id>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.