1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. OidcScope
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

vault.identity.OidcScope

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

    Manages OIDC Scopes in a Vault server. See the Vault documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const groups = new vault.identity.OidcScope("groups", {
        name: "groups",
        template: "{\"groups\":{{identity.entity.groups.names}}}",
        description: "Vault OIDC Groups Scope",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    groups = vault.identity.OidcScope("groups",
        name="groups",
        template="{\"groups\":{{identity.entity.groups.names}}}",
        description="Vault OIDC Groups Scope")
    
    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 {
    		_, err := identity.NewOidcScope(ctx, "groups", &identity.OidcScopeArgs{
    			Name:        pulumi.String("groups"),
    			Template:    pulumi.String("{\"groups\":{{identity.entity.groups.names}}}"),
    			Description: pulumi.String("Vault OIDC Groups Scope"),
    		})
    		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 groups = new Vault.Identity.OidcScope("groups", new()
        {
            Name = "groups",
            Template = "{\"groups\":{{identity.entity.groups.names}}}",
            Description = "Vault OIDC Groups Scope",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.OidcScope;
    import com.pulumi.vault.identity.OidcScopeArgs;
    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 groups = new OidcScope("groups", OidcScopeArgs.builder()
                .name("groups")
                .template("{\"groups\":{{identity.entity.groups.names}}}")
                .description("Vault OIDC Groups Scope")
                .build());
    
        }
    }
    
    resources:
      groups:
        type: vault:identity:OidcScope
        properties:
          name: groups
          template: '{"groups":{{identity.entity.groups.names}}}'
          description: Vault OIDC Groups Scope
    

    Create OidcScope Resource

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

    Constructor syntax

    new OidcScope(name: string, args?: OidcScopeArgs, opts?: CustomResourceOptions);
    @overload
    def OidcScope(resource_name: str,
                  args: Optional[OidcScopeArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def OidcScope(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  namespace: Optional[str] = None,
                  template: Optional[str] = None)
    func NewOidcScope(ctx *Context, name string, args *OidcScopeArgs, opts ...ResourceOption) (*OidcScope, error)
    public OidcScope(string name, OidcScopeArgs? args = null, CustomResourceOptions? opts = null)
    public OidcScope(String name, OidcScopeArgs args)
    public OidcScope(String name, OidcScopeArgs args, CustomResourceOptions options)
    
    type: vault:identity:OidcScope
    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 OidcScopeArgs
    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 OidcScopeArgs
    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 OidcScopeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OidcScopeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OidcScopeArgs
    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 oidcScopeResource = new Vault.Identity.OidcScope("oidcScopeResource", new()
    {
        Description = "string",
        Name = "string",
        Namespace = "string",
        Template = "string",
    });
    
    example, err := identity.NewOidcScope(ctx, "oidcScopeResource", &identity.OidcScopeArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Namespace:   pulumi.String("string"),
    	Template:    pulumi.String("string"),
    })
    
    var oidcScopeResource = new OidcScope("oidcScopeResource", OidcScopeArgs.builder()
        .description("string")
        .name("string")
        .namespace("string")
        .template("string")
        .build());
    
    oidc_scope_resource = vault.identity.OidcScope("oidcScopeResource",
        description="string",
        name="string",
        namespace="string",
        template="string")
    
    const oidcScopeResource = new vault.identity.OidcScope("oidcScopeResource", {
        description: "string",
        name: "string",
        namespace: "string",
        template: "string",
    });
    
    type: vault:identity:OidcScope
    properties:
        description: string
        name: string
        namespace: string
        template: string
    

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

    Description string
    A description of the scope.
    Name string
    The name of the scope. The openid scope name is reserved.
    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.
    Template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    Description string
    A description of the scope.
    Name string
    The name of the scope. The openid scope name is reserved.
    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.
    Template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description String
    A description of the scope.
    name String
    The name of the scope. The openid scope name is reserved.
    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.
    template String
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description string
    A description of the scope.
    name string
    The name of the scope. The openid scope name is reserved.
    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.
    template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description str
    A description of the scope.
    name str
    The name of the scope. The openid scope name is reserved.
    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.
    template str
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description String
    A description of the scope.
    name String
    The name of the scope. The openid scope name is reserved.
    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.
    template String
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.

    Outputs

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

    Get an existing OidcScope 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?: OidcScopeState, opts?: CustomResourceOptions): OidcScope
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            template: Optional[str] = None) -> OidcScope
    func GetOidcScope(ctx *Context, name string, id IDInput, state *OidcScopeState, opts ...ResourceOption) (*OidcScope, error)
    public static OidcScope Get(string name, Input<string> id, OidcScopeState? state, CustomResourceOptions? opts = null)
    public static OidcScope get(String name, Output<String> id, OidcScopeState 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:
    Description string
    A description of the scope.
    Name string
    The name of the scope. The openid scope name is reserved.
    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.
    Template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    Description string
    A description of the scope.
    Name string
    The name of the scope. The openid scope name is reserved.
    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.
    Template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description String
    A description of the scope.
    name String
    The name of the scope. The openid scope name is reserved.
    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.
    template String
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description string
    A description of the scope.
    name string
    The name of the scope. The openid scope name is reserved.
    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.
    template string
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description str
    A description of the scope.
    name str
    The name of the scope. The openid scope name is reserved.
    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.
    template str
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.
    description String
    A description of the scope.
    name String
    The name of the scope. The openid scope name is reserved.
    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.
    template String
    The template string for the scope. This may be provided as escaped JSON or base64 encoded JSON.

    Import

    OIDC Scopes can be imported using the name, e.g.

    $ pulumi import vault:identity/oidcScope:OidcScope groups groups
    

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

    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.2.0 published on Friday, Jun 21, 2024 by Pulumi