1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. OidcKeyAllowedClientID
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

vault.identity.OidcKeyAllowedClientID

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const key = new vault.identity.OidcKey("key", {
        name: "key",
        algorithm: "RS256",
    });
    const role = new vault.identity.OidcRole("role", {
        name: "role",
        key: key.name,
    });
    const roleOidcKeyAllowedClientID = new vault.identity.OidcKeyAllowedClientID("role", {
        keyName: key.name,
        allowedClientId: role.clientId,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    key = vault.identity.OidcKey("key",
        name="key",
        algorithm="RS256")
    role = vault.identity.OidcRole("role",
        name="role",
        key=key.name)
    role_oidc_key_allowed_client_id = vault.identity.OidcKeyAllowedClientID("role",
        key_name=key.name,
        allowed_client_id=role.client_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		key, err := identity.NewOidcKey(ctx, "key", &identity.OidcKeyArgs{
    			Name:      pulumi.String("key"),
    			Algorithm: pulumi.String("RS256"),
    		})
    		if err != nil {
    			return err
    		}
    		role, err := identity.NewOidcRole(ctx, "role", &identity.OidcRoleArgs{
    			Name: pulumi.String("role"),
    			Key:  key.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = identity.NewOidcKeyAllowedClientID(ctx, "role", &identity.OidcKeyAllowedClientIDArgs{
    			KeyName:         key.Name,
    			AllowedClientId: role.ClientId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var key = new Vault.Identity.OidcKey("key", new()
        {
            Name = "key",
            Algorithm = "RS256",
        });
    
        var role = new Vault.Identity.OidcRole("role", new()
        {
            Name = "role",
            Key = key.Name,
        });
    
        var roleOidcKeyAllowedClientID = new Vault.Identity.OidcKeyAllowedClientID("role", new()
        {
            KeyName = key.Name,
            AllowedClientId = role.ClientId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.OidcKey;
    import com.pulumi.vault.identity.OidcKeyArgs;
    import com.pulumi.vault.identity.OidcRole;
    import com.pulumi.vault.identity.OidcRoleArgs;
    import com.pulumi.vault.identity.OidcKeyAllowedClientID;
    import com.pulumi.vault.identity.OidcKeyAllowedClientIDArgs;
    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 key = new OidcKey("key", OidcKeyArgs.builder()
                .name("key")
                .algorithm("RS256")
                .build());
    
            var role = new OidcRole("role", OidcRoleArgs.builder()
                .name("role")
                .key(key.name())
                .build());
    
            var roleOidcKeyAllowedClientID = new OidcKeyAllowedClientID("roleOidcKeyAllowedClientID", OidcKeyAllowedClientIDArgs.builder()
                .keyName(key.name())
                .allowedClientId(role.clientId())
                .build());
    
        }
    }
    
    resources:
      key:
        type: vault:identity:OidcKey
        properties:
          name: key
          algorithm: RS256
      role:
        type: vault:identity:OidcRole
        properties:
          name: role
          key: ${key.name}
      roleOidcKeyAllowedClientID:
        type: vault:identity:OidcKeyAllowedClientID
        name: role
        properties:
          keyName: ${key.name}
          allowedClientId: ${role.clientId}
    

    Create OidcKeyAllowedClientID Resource

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

    Constructor syntax

    new OidcKeyAllowedClientID(name: string, args: OidcKeyAllowedClientIDArgs, opts?: CustomResourceOptions);
    @overload
    def OidcKeyAllowedClientID(resource_name: str,
                               args: OidcKeyAllowedClientIDArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def OidcKeyAllowedClientID(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               allowed_client_id: Optional[str] = None,
                               key_name: Optional[str] = None,
                               namespace: Optional[str] = None)
    func NewOidcKeyAllowedClientID(ctx *Context, name string, args OidcKeyAllowedClientIDArgs, opts ...ResourceOption) (*OidcKeyAllowedClientID, error)
    public OidcKeyAllowedClientID(string name, OidcKeyAllowedClientIDArgs args, CustomResourceOptions? opts = null)
    public OidcKeyAllowedClientID(String name, OidcKeyAllowedClientIDArgs args)
    public OidcKeyAllowedClientID(String name, OidcKeyAllowedClientIDArgs args, CustomResourceOptions options)
    
    type: vault:identity:OidcKeyAllowedClientID
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OidcKeyAllowedClientIDArgs
    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 OidcKeyAllowedClientIDArgs
    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 OidcKeyAllowedClientIDArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OidcKeyAllowedClientIDArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OidcKeyAllowedClientIDArgs
    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 oidcKeyAllowedClientIDResource = new Vault.Identity.OidcKeyAllowedClientID("oidcKeyAllowedClientIDResource", new()
    {
        AllowedClientId = "string",
        KeyName = "string",
        Namespace = "string",
    });
    
    example, err := identity.NewOidcKeyAllowedClientID(ctx, "oidcKeyAllowedClientIDResource", &identity.OidcKeyAllowedClientIDArgs{
    	AllowedClientId: pulumi.String("string"),
    	KeyName:         pulumi.String("string"),
    	Namespace:       pulumi.String("string"),
    })
    
    var oidcKeyAllowedClientIDResource = new OidcKeyAllowedClientID("oidcKeyAllowedClientIDResource", OidcKeyAllowedClientIDArgs.builder()
        .allowedClientId("string")
        .keyName("string")
        .namespace("string")
        .build());
    
    oidc_key_allowed_client_id_resource = vault.identity.OidcKeyAllowedClientID("oidcKeyAllowedClientIDResource",
        allowed_client_id="string",
        key_name="string",
        namespace="string")
    
    const oidcKeyAllowedClientIDResource = new vault.identity.OidcKeyAllowedClientID("oidcKeyAllowedClientIDResource", {
        allowedClientId: "string",
        keyName: "string",
        namespace: "string",
    });
    
    type: vault:identity:OidcKeyAllowedClientID
    properties:
        allowedClientId: string
        keyName: string
        namespace: string
    

    OidcKeyAllowedClientID Resource Properties

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

    Inputs

    The OidcKeyAllowedClientID resource accepts the following input properties:

    AllowedClientId string
    Client ID to allow usage with the OIDC named key
    KeyName string
    Name of the OIDC Key allow the Client ID.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    AllowedClientId string
    Client ID to allow usage with the OIDC named key
    KeyName string
    Name of the OIDC Key allow the Client ID.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId String
    Client ID to allow usage with the OIDC named key
    keyName String
    Name of the OIDC Key allow the Client ID.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId string
    Client ID to allow usage with the OIDC named key
    keyName string
    Name of the OIDC Key allow the Client ID.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowed_client_id str
    Client ID to allow usage with the OIDC named key
    key_name str
    Name of the OIDC Key allow the Client ID.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId String
    Client ID to allow usage with the OIDC named key
    keyName String
    Name of the OIDC Key allow the Client ID.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OidcKeyAllowedClientID 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 OidcKeyAllowedClientID Resource

    Get an existing OidcKeyAllowedClientID 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?: OidcKeyAllowedClientIDState, opts?: CustomResourceOptions): OidcKeyAllowedClientID
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_client_id: Optional[str] = None,
            key_name: Optional[str] = None,
            namespace: Optional[str] = None) -> OidcKeyAllowedClientID
    func GetOidcKeyAllowedClientID(ctx *Context, name string, id IDInput, state *OidcKeyAllowedClientIDState, opts ...ResourceOption) (*OidcKeyAllowedClientID, error)
    public static OidcKeyAllowedClientID Get(string name, Input<string> id, OidcKeyAllowedClientIDState? state, CustomResourceOptions? opts = null)
    public static OidcKeyAllowedClientID get(String name, Output<String> id, OidcKeyAllowedClientIDState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AllowedClientId string
    Client ID to allow usage with the OIDC named key
    KeyName string
    Name of the OIDC Key allow the Client ID.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    AllowedClientId string
    Client ID to allow usage with the OIDC named key
    KeyName string
    Name of the OIDC Key allow the Client ID.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId String
    Client ID to allow usage with the OIDC named key
    keyName String
    Name of the OIDC Key allow the Client ID.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId string
    Client ID to allow usage with the OIDC named key
    keyName string
    Name of the OIDC Key allow the Client ID.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowed_client_id str
    Client ID to allow usage with the OIDC named key
    key_name str
    Name of the OIDC Key allow the Client ID.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.
    allowedClientId String
    Client ID to allow usage with the OIDC named key
    keyName String
    Name of the OIDC Key allow the Client ID.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace. Available only for Vault Enterprise.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi