class OpenIdConnectProvider (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Eks.V2.Alpha.OpenIdConnectProvider |
Go | github.com/aws/aws-cdk-go/awscdkeksv2alpha/v2#OpenIdConnectProvider |
Java | software.amazon.awscdk.services.eks.v2.alpha.OpenIdConnectProvider |
Python | aws_cdk.aws_eks_v2_alpha.OpenIdConnectProvider |
TypeScript (source) | @aws-cdk/aws-eks-v2-alpha » OpenIdConnectProvider |
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Implements
IConstruct, IDependable, IResource, IEnvironment, IOpen, IOIDCProvider
IAM OIDC identity providers are entities in IAM that describe an external identity provider (IdP) service that supports the OpenID Connect (OIDC) standard, such as Google or Salesforce.
You use an IAM OIDC identity provider when you want to establish trust between an OIDC-compatible IdP and your AWS account.
This implementation has default values for thumbprints and clientIds props that will be compatible with the eks cluster
See also: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html
Example
import * as cdk from 'aws-cdk-lib';
// Step 1: Add retain policy to existing provider
const existingProvider = new eks.OpenIdConnectProvider(this, 'Provider', {
url: 'https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLE',
removalPolicy: cdk.RemovalPolicy.RETAIN, // Add this line
});
Initializer
new OpenIdConnectProvider(scope: Construct, id: string, props: OpenIdConnectProviderProps)
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Parameters
- scope
Construct— The definition scope. - id
string— Construct ID. - props
Open— Initialization properties.Id Connect Provider Props
Defines an OpenID Connect provider.
Construct Props
| Name | Type | Description |
|---|---|---|
| url | string | The URL of the identity provider. |
| removal | Removal | The removal policy to apply to the OpenID Connect Provider. |
url
Type:
string
The URL of the identity provider.
The URL must begin with https:// and should correspond to the iss claim in the provider's OpenID Connect ID tokens. Per the OIDC standard, path components are allowed but query parameters are not. Typically the URL consists of only a hostname, like https://server.example.org or https://example.com.
You can find your OIDC Issuer URL by: aws eks describe-cluster --name %cluster_name% --query "cluster.identity.oidc.issuer" --output text
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
The removal policy to apply to the OpenID Connect Provider.
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| oidc | OIDCProvider | A reference to a OIDCProvider resource. |
| open | string | The Amazon Resource Name (ARN) of the IAM OpenID Connect provider. |
| open | string | The issuer for OIDC Provider. |
| open | string | The thumbprints configured for this provider. |
| stack | Stack | The stack in which this resource is defined. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
env
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
Node
The tree node.
oidcProviderRef
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
OIDCProvider
A reference to a OIDCProvider resource.
openIdConnectProviderArn
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
string
The Amazon Resource Name (ARN) of the IAM OpenID Connect provider.
openIdConnectProviderIssuer
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
string
The issuer for OIDC Provider.
openIdConnectProviderthumbprints
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
string
The thumbprints configured for this provider.
stack
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
Stack
The stack in which this resource is defined.
static PROPERTY_INJECTION_ID
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| to | Returns a string representation of this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
toString()
public toString(): string
⚠️ Deprecated: Use OidcProviderNative instead. This construct will be removed in a future major release.
Returns
string
Returns a string representation of this construct.

.NET
Go
Java
Python
TypeScript (