1. Packages
  2. Pulumi Vault Provider
  3. API Docs
  4. pkiSecret
  5. BackendConfigCluster
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

vault.pkiSecret.BackendConfigCluster

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Allows setting the cluster-local’s API mount path and AIA distribution point on a particular performance replication cluster.

    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.BackendConfigCluster("example", {
        backend: root.path,
        path: "http://127.0.0.1:8200/v1/pki-root",
        aiaPath: "http://127.0.0.1:8200/v1/pki-root",
    });
    
    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.BackendConfigCluster("example",
        backend=root.path,
        path="http://127.0.0.1:8200/v1/pki-root",
        aia_path="http://127.0.0.1:8200/v1/pki-root")
    
    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.NewBackendConfigCluster(ctx, "example", &pkiSecret.BackendConfigClusterArgs{
    			Backend: root.Path,
    			Path:    pulumi.String("http://127.0.0.1:8200/v1/pki-root"),
    			AiaPath: pulumi.String("http://127.0.0.1:8200/v1/pki-root"),
    		})
    		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.BackendConfigCluster("example", new()
        {
            Backend = root.Path,
            Path = "http://127.0.0.1:8200/v1/pki-root",
            AiaPath = "http://127.0.0.1:8200/v1/pki-root",
        });
    
    });
    
    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.BackendConfigCluster;
    import com.pulumi.vault.pkiSecret.BackendConfigClusterArgs;
    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 BackendConfigCluster("example", BackendConfigClusterArgs.builder()
                .backend(root.path())
                .path("http://127.0.0.1:8200/v1/pki-root")
                .aiaPath("http://127.0.0.1:8200/v1/pki-root")
                .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:BackendConfigCluster
        properties:
          backend: ${root.path}
          path: http://127.0.0.1:8200/v1/pki-root
          aiaPath: http://127.0.0.1:8200/v1/pki-root
    

    Create BackendConfigCluster Resource

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

    Constructor syntax

    new BackendConfigCluster(name: string, args: BackendConfigClusterArgs, opts?: CustomResourceOptions);
    @overload
    def BackendConfigCluster(resource_name: str,
                             args: BackendConfigClusterArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackendConfigCluster(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             backend: Optional[str] = None,
                             aia_path: Optional[str] = None,
                             namespace: Optional[str] = None,
                             path: Optional[str] = None)
    func NewBackendConfigCluster(ctx *Context, name string, args BackendConfigClusterArgs, opts ...ResourceOption) (*BackendConfigCluster, error)
    public BackendConfigCluster(string name, BackendConfigClusterArgs args, CustomResourceOptions? opts = null)
    public BackendConfigCluster(String name, BackendConfigClusterArgs args)
    public BackendConfigCluster(String name, BackendConfigClusterArgs args, CustomResourceOptions options)
    
    type: vault:pkiSecret:BackendConfigCluster
    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 BackendConfigClusterArgs
    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 BackendConfigClusterArgs
    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 BackendConfigClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackendConfigClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackendConfigClusterArgs
    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 backendConfigClusterResource = new Vault.PkiSecret.BackendConfigCluster("backendConfigClusterResource", new()
    {
        Backend = "string",
        AiaPath = "string",
        Namespace = "string",
        Path = "string",
    });
    
    example, err := pkiSecret.NewBackendConfigCluster(ctx, "backendConfigClusterResource", &pkiSecret.BackendConfigClusterArgs{
    	Backend:   pulumi.String("string"),
    	AiaPath:   pulumi.String("string"),
    	Namespace: pulumi.String("string"),
    	Path:      pulumi.String("string"),
    })
    
    var backendConfigClusterResource = new BackendConfigCluster("backendConfigClusterResource", BackendConfigClusterArgs.builder()
        .backend("string")
        .aiaPath("string")
        .namespace("string")
        .path("string")
        .build());
    
    backend_config_cluster_resource = vault.pki_secret.BackendConfigCluster("backendConfigClusterResource",
        backend="string",
        aia_path="string",
        namespace="string",
        path="string")
    
    const backendConfigClusterResource = new vault.pkisecret.BackendConfigCluster("backendConfigClusterResource", {
        backend: "string",
        aiaPath: "string",
        namespace: "string",
        path: "string",
    });
    
    type: vault:pkiSecret:BackendConfigCluster
    properties:
        aiaPath: string
        backend: string
        namespace: string
        path: string
    

    BackendConfigCluster Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BackendConfigCluster resource accepts the following input properties:

    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    AiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    Path string
    Specifies the path to this performance replication cluster's API mount path.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    AiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    Path string
    Specifies the path to this performance replication cluster's API mount path.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    aiaPath String
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    path String
    Specifies the path to this performance replication cluster's API mount path.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    aiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    path string
    Specifies the path to this performance replication cluster's API mount path.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    aia_path str
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    path str
    Specifies the path to this performance replication cluster's API mount path.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    aiaPath String
    Specifies the path to this performance replication cluster's AIA distribution point.
    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.
    path String
    Specifies the path to this performance replication cluster's API mount path.

    Outputs

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

    Get an existing BackendConfigCluster 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?: BackendConfigClusterState, opts?: CustomResourceOptions): BackendConfigCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aia_path: Optional[str] = None,
            backend: Optional[str] = None,
            namespace: Optional[str] = None,
            path: Optional[str] = None) -> BackendConfigCluster
    func GetBackendConfigCluster(ctx *Context, name string, id IDInput, state *BackendConfigClusterState, opts ...ResourceOption) (*BackendConfigCluster, error)
    public static BackendConfigCluster Get(string name, Input<string> id, BackendConfigClusterState? state, CustomResourceOptions? opts = null)
    public static BackendConfigCluster get(String name, Output<String> id, BackendConfigClusterState 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:
    AiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    Path string
    Specifies the path to this performance replication cluster's API mount path.
    AiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    Backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    Path string
    Specifies the path to this performance replication cluster's API mount path.
    aiaPath String
    Specifies the path to this performance replication cluster's AIA distribution point.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    path String
    Specifies the path to this performance replication cluster's API mount path.
    aiaPath string
    Specifies the path to this performance replication cluster's AIA distribution point.
    backend string
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    path string
    Specifies the path to this performance replication cluster's API mount path.
    aia_path str
    Specifies the path to this performance replication cluster's AIA distribution point.
    backend str
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    path str
    Specifies the path to this performance replication cluster's API mount path.
    aiaPath String
    Specifies the path to this performance replication cluster's AIA distribution point.
    backend String
    The path the PKI secret backend is mounted at, with no leading or trailing /s.
    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.
    path String
    Specifies the path to this performance replication cluster's API mount path.

    Import

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

    $ pulumi import vault:pkiSecret/backendConfigCluster:BackendConfigCluster example pki-root/config/cluster
    

    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.4.0 published on Wednesday, Nov 20, 2024 by Pulumi