vault.ssh.SecretBackendCa
Explore with Pulumi AI
Provides a resource to manage CA information in an SSH secret backend SSH secret backend within Vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const example = new vault.Mount("example", {type: "ssh"});
const foo = new vault.ssh.SecretBackendCa("foo", {backend: example.path});
import pulumi
import pulumi_vault as vault
example = vault.Mount("example", type="ssh")
foo = vault.ssh.SecretBackendCa("foo", backend=example.path)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/ssh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := vault.NewMount(ctx, "example", &vault.MountArgs{
Type: pulumi.String("ssh"),
})
if err != nil {
return err
}
_, err = ssh.NewSecretBackendCa(ctx, "foo", &ssh.SecretBackendCaArgs{
Backend: example.Path,
})
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 example = new Vault.Mount("example", new()
{
Type = "ssh",
});
var foo = new Vault.Ssh.SecretBackendCa("foo", new()
{
Backend = example.Path,
});
});
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.ssh.SecretBackendCa;
import com.pulumi.vault.ssh.SecretBackendCaArgs;
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 example = new Mount("example", MountArgs.builder()
.type("ssh")
.build());
var foo = new SecretBackendCa("foo", SecretBackendCaArgs.builder()
.backend(example.path())
.build());
}
}
resources:
example:
type: vault:Mount
properties:
type: ssh
foo:
type: vault:ssh:SecretBackendCa
properties:
backend: ${example.path}
Create SecretBackendCa Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretBackendCa(name: string, args?: SecretBackendCaArgs, opts?: CustomResourceOptions);
@overload
def SecretBackendCa(resource_name: str,
args: Optional[SecretBackendCaArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SecretBackendCa(resource_name: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
generate_signing_key: Optional[bool] = None,
key_bits: Optional[int] = None,
key_type: Optional[str] = None,
namespace: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None)
func NewSecretBackendCa(ctx *Context, name string, args *SecretBackendCaArgs, opts ...ResourceOption) (*SecretBackendCa, error)
public SecretBackendCa(string name, SecretBackendCaArgs? args = null, CustomResourceOptions? opts = null)
public SecretBackendCa(String name, SecretBackendCaArgs args)
public SecretBackendCa(String name, SecretBackendCaArgs args, CustomResourceOptions options)
type: vault:ssh:SecretBackendCa
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args SecretBackendCaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args SecretBackendCaArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args SecretBackendCaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args SecretBackendCaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. SecretBackendCaArgs - 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 secretBackendCaResource = new Vault.Ssh.SecretBackendCa("secretBackendCaResource", new()
{
Backend = "string",
GenerateSigningKey = false,
KeyBits = 0,
KeyType = "string",
Namespace = "string",
PrivateKey = "string",
PublicKey = "string",
});
example, err := ssh.NewSecretBackendCa(ctx, "secretBackendCaResource", &ssh.SecretBackendCaArgs{
Backend: pulumi.String("string"),
GenerateSigningKey: pulumi.Bool(false),
KeyBits: pulumi.Int(0),
KeyType: pulumi.String("string"),
Namespace: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
PublicKey: pulumi.String("string"),
})
var secretBackendCaResource = new SecretBackendCa("secretBackendCaResource", SecretBackendCaArgs.builder()
.backend("string")
.generateSigningKey(false)
.keyBits(0)
.keyType("string")
.namespace("string")
.privateKey("string")
.publicKey("string")
.build());
secret_backend_ca_resource = vault.ssh.SecretBackendCa("secretBackendCaResource",
backend="string",
generate_signing_key=False,
key_bits=0,
key_type="string",
namespace="string",
private_key="string",
public_key="string")
const secretBackendCaResource = new vault.ssh.SecretBackendCa("secretBackendCaResource", {
backend: "string",
generateSigningKey: false,
keyBits: 0,
keyType: "string",
namespace: "string",
privateKey: "string",
publicKey: "string",
});
type: vault:ssh:SecretBackendCa
properties:
backend: string
generateSigningKey: false
keyBits: 0
keyType: string
namespace: string
privateKey: string
publicKey: string
SecretBackendCa 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 SecretBackendCa resource accepts the following input properties:
- Backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- Generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- Key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - Key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - Namespace
Changes to this property will trigger replacement.
- 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. - Private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- Public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- Backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- Generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- Key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - Key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - Namespace
Changes to this property will trigger replacement.
- 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. - Private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- Public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate_
signing_ key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key_
bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key_
type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private_
key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public_
key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretBackendCa 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 SecretBackendCa Resource
Get an existing SecretBackendCa 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?: SecretBackendCaState, opts?: CustomResourceOptions): SecretBackendCa
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
generate_signing_key: Optional[bool] = None,
key_bits: Optional[int] = None,
key_type: Optional[str] = None,
namespace: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None) -> SecretBackendCa
func GetSecretBackendCa(ctx *Context, name string, id IDInput, state *SecretBackendCaState, opts ...ResourceOption) (*SecretBackendCa, error)
public static SecretBackendCa Get(string name, Input<string> id, SecretBackendCaState? state, CustomResourceOptions? opts = null)
public static SecretBackendCa get(String name, Output<String> id, SecretBackendCaState state, CustomResourceOptions options)
resources: _: type: vault:ssh:SecretBackendCa get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- Generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- Key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - Key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - Namespace
Changes to this property will trigger replacement.
- 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. - Private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- Public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- Backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- Generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- Key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - Key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - Namespace
Changes to this property will trigger replacement.
- 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. - Private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- Public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate_
signing_ key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key_
bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key_
type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private_
key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public_
key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
- backend
Changes to this property will trigger replacement.
- The path where the SSH secret backend is mounted. Defaults to 'ssh'
- generate
Signing Key Changes to this property will trigger replacement.
- Whether Vault should generate the signing key pair internally. Defaults to true
- key
Bits Changes to this property will trigger replacement.
- Specifies the desired key bits for the generated SSH CA key when
generate_signing_key
is set totrue
. - key
Type Changes to this property will trigger replacement.
- Specifies the desired key type for the generated SSH CA key when
generate_signing_key
is set totrue
. - namespace
Changes to this property will trigger replacement.
- 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. - private
Key Changes to this property will trigger replacement.
- Private key part the SSH CA key pair; required if generate_signing_key is false.
- public
Key Changes to this property will trigger replacement.
- The public key part the SSH CA key pair; required if generate_signing_key is false.
Import
SSH secret backend CAs can be imported using the path
, e.g.
$ pulumi import vault:ssh/secretBackendCa:SecretBackendCa foo ssh
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.