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

vault.pkiSecret.SecretBackendConfigIssuers

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 pki = new vault.Mount("pki", {
        path: "pki",
        type: "pki",
        defaultLeaseTtlSeconds: 3600,
        maxLeaseTtlSeconds: 86400,
    });
    const root = new vault.pkisecret.SecretBackendRootCert("root", {
        backend: pki.path,
        type: "internal",
        commonName: "test",
        ttl: "86400",
    });
    const example = new vault.pkisecret.SecretBackendIssuer("example", {
        backend: root.backend,
        issuerRef: root.issuerId,
        issuerName: "example-issuer",
    });
    const config = new vault.pkisecret.SecretBackendConfigIssuers("config", {
        backend: pki.path,
        "default": example.issuerId,
        defaultFollowsLatestIssuer: true,
    });
    
    import pulumi
    import pulumi_vault as vault
    
    pki = vault.Mount("pki",
        path="pki",
        type="pki",
        default_lease_ttl_seconds=3600,
        max_lease_ttl_seconds=86400)
    root = vault.pki_secret.SecretBackendRootCert("root",
        backend=pki.path,
        type="internal",
        common_name="test",
        ttl="86400")
    example = vault.pki_secret.SecretBackendIssuer("example",
        backend=root.backend,
        issuer_ref=root.issuer_id,
        issuer_name="example-issuer")
    config = vault.pki_secret.SecretBackendConfigIssuers("config",
        backend=pki.path,
        default=example.issuer_id,
        default_follows_latest_issuer=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/pkiSecret"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pki, err := vault.NewMount(ctx, "pki", &vault.MountArgs{
    			Path:                   pulumi.String("pki"),
    			Type:                   pulumi.String("pki"),
    			DefaultLeaseTtlSeconds: pulumi.Int(3600),
    			MaxLeaseTtlSeconds:     pulumi.Int(86400),
    		})
    		if err != nil {
    			return err
    		}
    		root, err := pkiSecret.NewSecretBackendRootCert(ctx, "root", &pkiSecret.SecretBackendRootCertArgs{
    			Backend:    pki.Path,
    			Type:       pulumi.String("internal"),
    			CommonName: pulumi.String("test"),
    			Ttl:        pulumi.String("86400"),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := pkiSecret.NewSecretBackendIssuer(ctx, "example", &pkiSecret.SecretBackendIssuerArgs{
    			Backend:    root.Backend,
    			IssuerRef:  root.IssuerId,
    			IssuerName: pulumi.String("example-issuer"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pkiSecret.NewSecretBackendConfigIssuers(ctx, "config", &pkiSecret.SecretBackendConfigIssuersArgs{
    			Backend:                    pki.Path,
    			Default:                    example.IssuerId,
    			DefaultFollowsLatestIssuer: pulumi.Bool(true),
    		})
    		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 pki = new Vault.Mount("pki", new()
        {
            Path = "pki",
            Type = "pki",
            DefaultLeaseTtlSeconds = 3600,
            MaxLeaseTtlSeconds = 86400,
        });
    
        var root = new Vault.PkiSecret.SecretBackendRootCert("root", new()
        {
            Backend = pki.Path,
            Type = "internal",
            CommonName = "test",
            Ttl = "86400",
        });
    
        var example = new Vault.PkiSecret.SecretBackendIssuer("example", new()
        {
            Backend = root.Backend,
            IssuerRef = root.IssuerId,
            IssuerName = "example-issuer",
        });
    
        var config = new Vault.PkiSecret.SecretBackendConfigIssuers("config", new()
        {
            Backend = pki.Path,
            Default = example.IssuerId,
            DefaultFollowsLatestIssuer = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.Mount;
    import com.pulumi.vault.MountArgs;
    import com.pulumi.vault.pkiSecret.SecretBackendRootCert;
    import com.pulumi.vault.pkiSecret.SecretBackendRootCertArgs;
    import com.pulumi.vault.pkiSecret.SecretBackendIssuer;
    import com.pulumi.vault.pkiSecret.SecretBackendIssuerArgs;
    import com.pulumi.vault.pkiSecret.SecretBackendConfigIssuers;
    import com.pulumi.vault.pkiSecret.SecretBackendConfigIssuersArgs;
    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 pki = new Mount("pki", MountArgs.builder()
                .path("pki")
                .type("pki")
                .defaultLeaseTtlSeconds(3600)
                .maxLeaseTtlSeconds(86400)
                .build());
    
            var root = new SecretBackendRootCert("root", SecretBackendRootCertArgs.builder()
                .backend(pki.path())
                .type("internal")
                .commonName("test")
                .ttl("86400")
                .build());
    
            var example = new SecretBackendIssuer("example", SecretBackendIssuerArgs.builder()
                .backend(root.backend())
                .issuerRef(root.issuerId())
                .issuerName("example-issuer")
                .build());
    
            var config = new SecretBackendConfigIssuers("config", SecretBackendConfigIssuersArgs.builder()
                .backend(pki.path())
                .default_(example.issuerId())
                .defaultFollowsLatestIssuer(true)
                .build());
    
        }
    }
    
    resources:
      pki:
        type: vault:Mount
        properties:
          path: pki
          type: pki
          defaultLeaseTtlSeconds: 3600
          maxLeaseTtlSeconds: 86400
      root:
        type: vault:pkiSecret:SecretBackendRootCert
        properties:
          backend: ${pki.path}
          type: internal
          commonName: test
          ttl: '86400'
      example:
        type: vault:pkiSecret:SecretBackendIssuer
        properties:
          backend: ${root.backend}
          issuerRef: ${root.issuerId}
          issuerName: example-issuer
      config:
        type: vault:pkiSecret:SecretBackendConfigIssuers
        properties:
          backend: ${pki.path}
          default: ${example.issuerId}
          defaultFollowsLatestIssuer: true
    

    Create SecretBackendConfigIssuers Resource

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

    Constructor syntax

    new SecretBackendConfigIssuers(name: string, args: SecretBackendConfigIssuersArgs, opts?: CustomResourceOptions);
    @overload
    def SecretBackendConfigIssuers(resource_name: str,
                                   args: SecretBackendConfigIssuersArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretBackendConfigIssuers(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   backend: Optional[str] = None,
                                   default: Optional[str] = None,
                                   default_follows_latest_issuer: Optional[bool] = None,
                                   namespace: Optional[str] = None)
    func NewSecretBackendConfigIssuers(ctx *Context, name string, args SecretBackendConfigIssuersArgs, opts ...ResourceOption) (*SecretBackendConfigIssuers, error)
    public SecretBackendConfigIssuers(string name, SecretBackendConfigIssuersArgs args, CustomResourceOptions? opts = null)
    public SecretBackendConfigIssuers(String name, SecretBackendConfigIssuersArgs args)
    public SecretBackendConfigIssuers(String name, SecretBackendConfigIssuersArgs args, CustomResourceOptions options)
    
    type: vault:pkiSecret:SecretBackendConfigIssuers
    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 SecretBackendConfigIssuersArgs
    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 SecretBackendConfigIssuersArgs
    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 SecretBackendConfigIssuersArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretBackendConfigIssuersArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretBackendConfigIssuersArgs
    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 secretBackendConfigIssuersResource = new Vault.PkiSecret.SecretBackendConfigIssuers("secretBackendConfigIssuersResource", new()
    {
        Backend = "string",
        Default = "string",
        DefaultFollowsLatestIssuer = false,
        Namespace = "string",
    });
    
    example, err := pkiSecret.NewSecretBackendConfigIssuers(ctx, "secretBackendConfigIssuersResource", &pkiSecret.SecretBackendConfigIssuersArgs{
    	Backend:                    pulumi.String("string"),
    	Default:                    pulumi.String("string"),
    	DefaultFollowsLatestIssuer: pulumi.Bool(false),
    	Namespace:                  pulumi.String("string"),
    })
    
    var secretBackendConfigIssuersResource = new SecretBackendConfigIssuers("secretBackendConfigIssuersResource", SecretBackendConfigIssuersArgs.builder()
        .backend("string")
        .default_("string")
        .defaultFollowsLatestIssuer(false)
        .namespace("string")
        .build());
    
    secret_backend_config_issuers_resource = vault.pki_secret.SecretBackendConfigIssuers("secretBackendConfigIssuersResource",
        backend="string",
        default="string",
        default_follows_latest_issuer=False,
        namespace="string")
    
    const secretBackendConfigIssuersResource = new vault.pkisecret.SecretBackendConfigIssuers("secretBackendConfigIssuersResource", {
        backend: "string",
        "default": "string",
        defaultFollowsLatestIssuer: false,
        namespace: "string",
    });
    
    type: vault:pkiSecret:SecretBackendConfigIssuers
    properties:
        backend: string
        default: string
        defaultFollowsLatestIssuer: false
        namespace: string
    

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

    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    Default string
    Specifies the default issuer by ID.
    DefaultFollowsLatestIssuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    Default string
    Specifies the default issuer by ID.
    DefaultFollowsLatestIssuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    defaultFollowsLatestIssuer Boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    default_ String
    Specifies the default issuer by 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.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default string
    Specifies the default issuer by ID.
    defaultFollowsLatestIssuer boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default str
    Specifies the default issuer by ID.
    default_follows_latest_issuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default String
    Specifies the default issuer by ID.
    defaultFollowsLatestIssuer Boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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 SecretBackendConfigIssuers 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 SecretBackendConfigIssuers Resource

    Get an existing SecretBackendConfigIssuers 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?: SecretBackendConfigIssuersState, opts?: CustomResourceOptions): SecretBackendConfigIssuers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[str] = None,
            default: Optional[str] = None,
            default_follows_latest_issuer: Optional[bool] = None,
            namespace: Optional[str] = None) -> SecretBackendConfigIssuers
    func GetSecretBackendConfigIssuers(ctx *Context, name string, id IDInput, state *SecretBackendConfigIssuersState, opts ...ResourceOption) (*SecretBackendConfigIssuers, error)
    public static SecretBackendConfigIssuers Get(string name, Input<string> id, SecretBackendConfigIssuersState? state, CustomResourceOptions? opts = null)
    public static SecretBackendConfigIssuers get(String name, Output<String> id, SecretBackendConfigIssuersState 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:
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    Default string
    Specifies the default issuer by ID.
    DefaultFollowsLatestIssuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    Default string
    Specifies the default issuer by ID.
    DefaultFollowsLatestIssuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    defaultFollowsLatestIssuer Boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    default_ String
    Specifies the default issuer by 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.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default string
    Specifies the default issuer by ID.
    defaultFollowsLatestIssuer boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default str
    Specifies the default issuer by ID.
    default_follows_latest_issuer bool
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    default String
    Specifies the default issuer by ID.
    defaultFollowsLatestIssuer Boolean
    Specifies whether a root creation or an issuer import operation updates the default issuer to the newly added issuer.
    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.

    Import

    PKI secret backend config issuers can be imported using the path, e.g.

    $ pulumi import vault:pkiSecret/secretBackendConfigIssuers:SecretBackendConfigIssuers config pki/config/issuers
    

    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.3.0 published on Thursday, Aug 8, 2024 by Pulumi