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

vault.pkiSecret.SecretBackendConfigUrls

Explore with Pulumi AI

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

    Allows setting the issuing certificate endpoints, CRL distribution points, and OCSP server endpoints that will be encoded into issued certificates.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const root = new vault.Mount("root", {
        path: "pki-root",
        type: "pki",
        description: "root PKI",
        defaultLeaseTtlSeconds: 8640000,
        maxLeaseTtlSeconds: 8640000,
    });
    const example = new vault.pkisecret.SecretBackendConfigUrls("example", {
        backend: root.path,
        issuingCertificates: ["http://127.0.0.1:8200/v1/pki/ca"],
    });
    
    import pulumi
    import pulumi_vault as vault
    
    root = vault.Mount("root",
        path="pki-root",
        type="pki",
        description="root PKI",
        default_lease_ttl_seconds=8640000,
        max_lease_ttl_seconds=8640000)
    example = vault.pki_secret.SecretBackendConfigUrls("example",
        backend=root.path,
        issuing_certificates=["http://127.0.0.1:8200/v1/pki/ca"])
    
    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 {
    		root, err := vault.NewMount(ctx, "root", &vault.MountArgs{
    			Path:                   pulumi.String("pki-root"),
    			Type:                   pulumi.String("pki"),
    			Description:            pulumi.String("root PKI"),
    			DefaultLeaseTtlSeconds: pulumi.Int(8640000),
    			MaxLeaseTtlSeconds:     pulumi.Int(8640000),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pkiSecret.NewSecretBackendConfigUrls(ctx, "example", &pkiSecret.SecretBackendConfigUrlsArgs{
    			Backend: root.Path,
    			IssuingCertificates: pulumi.StringArray{
    				pulumi.String("http://127.0.0.1:8200/v1/pki/ca"),
    			},
    		})
    		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 root = new Vault.Mount("root", new()
        {
            Path = "pki-root",
            Type = "pki",
            Description = "root PKI",
            DefaultLeaseTtlSeconds = 8640000,
            MaxLeaseTtlSeconds = 8640000,
        });
    
        var example = new Vault.PkiSecret.SecretBackendConfigUrls("example", new()
        {
            Backend = root.Path,
            IssuingCertificates = new[]
            {
                "http://127.0.0.1:8200/v1/pki/ca",
            },
        });
    
    });
    
    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.SecretBackendConfigUrls;
    import com.pulumi.vault.pkiSecret.SecretBackendConfigUrlsArgs;
    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 root = new Mount("root", MountArgs.builder()
                .path("pki-root")
                .type("pki")
                .description("root PKI")
                .defaultLeaseTtlSeconds(8640000)
                .maxLeaseTtlSeconds(8640000)
                .build());
    
            var example = new SecretBackendConfigUrls("example", SecretBackendConfigUrlsArgs.builder()
                .backend(root.path())
                .issuingCertificates("http://127.0.0.1:8200/v1/pki/ca")
                .build());
    
        }
    }
    
    resources:
      root:
        type: vault:Mount
        properties:
          path: pki-root
          type: pki
          description: root PKI
          defaultLeaseTtlSeconds: 8.64e+06
          maxLeaseTtlSeconds: 8.64e+06
      example:
        type: vault:pkiSecret:SecretBackendConfigUrls
        properties:
          backend: ${root.path}
          issuingCertificates:
            - http://127.0.0.1:8200/v1/pki/ca
    

    Create SecretBackendConfigUrls Resource

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

    Constructor syntax

    new SecretBackendConfigUrls(name: string, args: SecretBackendConfigUrlsArgs, opts?: CustomResourceOptions);
    @overload
    def SecretBackendConfigUrls(resource_name: str,
                                args: SecretBackendConfigUrlsArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretBackendConfigUrls(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                backend: Optional[str] = None,
                                crl_distribution_points: Optional[Sequence[str]] = None,
                                enable_templating: Optional[bool] = None,
                                issuing_certificates: Optional[Sequence[str]] = None,
                                namespace: Optional[str] = None,
                                ocsp_servers: Optional[Sequence[str]] = None)
    func NewSecretBackendConfigUrls(ctx *Context, name string, args SecretBackendConfigUrlsArgs, opts ...ResourceOption) (*SecretBackendConfigUrls, error)
    public SecretBackendConfigUrls(string name, SecretBackendConfigUrlsArgs args, CustomResourceOptions? opts = null)
    public SecretBackendConfigUrls(String name, SecretBackendConfigUrlsArgs args)
    public SecretBackendConfigUrls(String name, SecretBackendConfigUrlsArgs args, CustomResourceOptions options)
    
    type: vault:pkiSecret:SecretBackendConfigUrls
    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 SecretBackendConfigUrlsArgs
    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 SecretBackendConfigUrlsArgs
    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 SecretBackendConfigUrlsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretBackendConfigUrlsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretBackendConfigUrlsArgs
    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 secretBackendConfigUrlsResource = new Vault.PkiSecret.SecretBackendConfigUrls("secretBackendConfigUrlsResource", new()
    {
        Backend = "string",
        CrlDistributionPoints = new[]
        {
            "string",
        },
        EnableTemplating = false,
        IssuingCertificates = new[]
        {
            "string",
        },
        Namespace = "string",
        OcspServers = new[]
        {
            "string",
        },
    });
    
    example, err := pkiSecret.NewSecretBackendConfigUrls(ctx, "secretBackendConfigUrlsResource", &pkiSecret.SecretBackendConfigUrlsArgs{
    	Backend: pulumi.String("string"),
    	CrlDistributionPoints: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EnableTemplating: pulumi.Bool(false),
    	IssuingCertificates: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Namespace: pulumi.String("string"),
    	OcspServers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var secretBackendConfigUrlsResource = new SecretBackendConfigUrls("secretBackendConfigUrlsResource", SecretBackendConfigUrlsArgs.builder()
        .backend("string")
        .crlDistributionPoints("string")
        .enableTemplating(false)
        .issuingCertificates("string")
        .namespace("string")
        .ocspServers("string")
        .build());
    
    secret_backend_config_urls_resource = vault.pki_secret.SecretBackendConfigUrls("secretBackendConfigUrlsResource",
        backend="string",
        crl_distribution_points=["string"],
        enable_templating=False,
        issuing_certificates=["string"],
        namespace="string",
        ocsp_servers=["string"])
    
    const secretBackendConfigUrlsResource = new vault.pkisecret.SecretBackendConfigUrls("secretBackendConfigUrlsResource", {
        backend: "string",
        crlDistributionPoints: ["string"],
        enableTemplating: false,
        issuingCertificates: ["string"],
        namespace: "string",
        ocspServers: ["string"],
    });
    
    type: vault:pkiSecret:SecretBackendConfigUrls
    properties:
        backend: string
        crlDistributionPoints:
            - string
        enableTemplating: false
        issuingCertificates:
            - string
        namespace: string
        ocspServers:
            - string
    

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

    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    CrlDistributionPoints List<string>
    Specifies the URL values for the CRL Distribution Points field.
    EnableTemplating bool
    Specifies that templating of AIA fields is allowed.
    IssuingCertificates List<string>
    Specifies the URL values for the Issuing Certificate field.
    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.
    OcspServers List<string>
    Specifies the URL values for the OCSP Servers field.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    CrlDistributionPoints []string
    Specifies the URL values for the CRL Distribution Points field.
    EnableTemplating bool
    Specifies that templating of AIA fields is allowed.
    IssuingCertificates []string
    Specifies the URL values for the Issuing Certificate field.
    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.
    OcspServers []string
    Specifies the URL values for the OCSP Servers field.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints List<String>
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating Boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates List<String>
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers List<String>
    Specifies the URL values for the OCSP Servers field.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints string[]
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates string[]
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers string[]
    Specifies the URL values for the OCSP Servers field.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crl_distribution_points Sequence[str]
    Specifies the URL values for the CRL Distribution Points field.
    enable_templating bool
    Specifies that templating of AIA fields is allowed.
    issuing_certificates Sequence[str]
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocsp_servers Sequence[str]
    Specifies the URL values for the OCSP Servers field.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints List<String>
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating Boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates List<String>
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers List<String>
    Specifies the URL values for the OCSP Servers field.

    Outputs

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

    Get an existing SecretBackendConfigUrls 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?: SecretBackendConfigUrlsState, opts?: CustomResourceOptions): SecretBackendConfigUrls
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend: Optional[str] = None,
            crl_distribution_points: Optional[Sequence[str]] = None,
            enable_templating: Optional[bool] = None,
            issuing_certificates: Optional[Sequence[str]] = None,
            namespace: Optional[str] = None,
            ocsp_servers: Optional[Sequence[str]] = None) -> SecretBackendConfigUrls
    func GetSecretBackendConfigUrls(ctx *Context, name string, id IDInput, state *SecretBackendConfigUrlsState, opts ...ResourceOption) (*SecretBackendConfigUrls, error)
    public static SecretBackendConfigUrls Get(string name, Input<string> id, SecretBackendConfigUrlsState? state, CustomResourceOptions? opts = null)
    public static SecretBackendConfigUrls get(String name, Output<String> id, SecretBackendConfigUrlsState 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.
    CrlDistributionPoints List<string>
    Specifies the URL values for the CRL Distribution Points field.
    EnableTemplating bool
    Specifies that templating of AIA fields is allowed.
    IssuingCertificates List<string>
    Specifies the URL values for the Issuing Certificate field.
    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.
    OcspServers List<string>
    Specifies the URL values for the OCSP Servers field.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    CrlDistributionPoints []string
    Specifies the URL values for the CRL Distribution Points field.
    EnableTemplating bool
    Specifies that templating of AIA fields is allowed.
    IssuingCertificates []string
    Specifies the URL values for the Issuing Certificate field.
    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.
    OcspServers []string
    Specifies the URL values for the OCSP Servers field.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints List<String>
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating Boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates List<String>
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers List<String>
    Specifies the URL values for the OCSP Servers field.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints string[]
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates string[]
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers string[]
    Specifies the URL values for the OCSP Servers field.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crl_distribution_points Sequence[str]
    Specifies the URL values for the CRL Distribution Points field.
    enable_templating bool
    Specifies that templating of AIA fields is allowed.
    issuing_certificates Sequence[str]
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocsp_servers Sequence[str]
    Specifies the URL values for the OCSP Servers field.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    crlDistributionPoints List<String>
    Specifies the URL values for the CRL Distribution Points field.
    enableTemplating Boolean
    Specifies that templating of AIA fields is allowed.
    issuingCertificates List<String>
    Specifies the URL values for the Issuing Certificate field.
    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.
    ocspServers List<String>
    Specifies the URL values for the OCSP Servers field.

    Import

    The PKI config URLs can be imported using the resource’s id. In the case of the example above the id would be pki-root/config/urls, where the pki-root component is the resource’s backend, e.g.

    $ pulumi import vault:pkiSecret/secretBackendConfigUrls:SecretBackendConfigUrls example pki-root/config/urls
    

    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