Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.vault.ssh.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.vault.ssh.SecretBackendRoleArgs.builder
import com.pulumi.vault.ssh.kotlin.inputs.SecretBackendRoleAllowedUserKeyConfigArgs
import com.pulumi.vault.ssh.kotlin.inputs.SecretBackendRoleAllowedUserKeyConfigArgsBuilder
import kotlin.Any
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a resource to manage roles in an SSH secret backend
* [SSH secret backend within Vault](https://www.vaultproject.io/docs/secrets/ssh/index.html).
* ## Example Usage
*
* ```typescript
* 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.SecretBackendRole("foo", {
* name: "my-role",
* backend: example.path,
* keyType: "ca",
* allowUserCertificates: true,
* });
* const bar = new vault.ssh.SecretBackendRole("bar", {
* name: "otp-role",
* backend: example.path,
* keyType: "otp",
* defaultUser: "default",
* allowedUsers: "default,baz",
* cidrList: "0.0.0.0/0",
* });
* ```
* ```python
* import pulumi
* import pulumi_vault as vault
* example = vault.Mount("example", type="ssh")
* foo = vault.ssh.SecretBackendRole("foo",
* name="my-role",
* backend=example.path,
* key_type="ca",
* allow_user_certificates=True)
* bar = vault.ssh.SecretBackendRole("bar",
* name="otp-role",
* backend=example.path,
* key_type="otp",
* default_user="default",
* allowed_users="default,baz",
* cidr_list="0.0.0.0/0")
* ```
* ```csharp
* 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.SecretBackendRole("foo", new()
* {
* Name = "my-role",
* Backend = example.Path,
* KeyType = "ca",
* AllowUserCertificates = true,
* });
* var bar = new Vault.Ssh.SecretBackendRole("bar", new()
* {
* Name = "otp-role",
* Backend = example.Path,
* KeyType = "otp",
* DefaultUser = "default",
* AllowedUsers = "default,baz",
* CidrList = "0.0.0.0/0",
* });
* });
* ```
* ```go
* 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.NewSecretBackendRole(ctx, "foo", &ssh.SecretBackendRoleArgs{
* Name: pulumi.String("my-role"),
* Backend: example.Path,
* KeyType: pulumi.String("ca"),
* AllowUserCertificates: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = ssh.NewSecretBackendRole(ctx, "bar", &ssh.SecretBackendRoleArgs{
* Name: pulumi.String("otp-role"),
* Backend: example.Path,
* KeyType: pulumi.String("otp"),
* DefaultUser: pulumi.String("default"),
* AllowedUsers: pulumi.String("default,baz"),
* CidrList: pulumi.String("0.0.0.0/0"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.SecretBackendRole;
* import com.pulumi.vault.ssh.SecretBackendRoleArgs;
* 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 SecretBackendRole("foo", SecretBackendRoleArgs.builder()
* .name("my-role")
* .backend(example.path())
* .keyType("ca")
* .allowUserCertificates(true)
* .build());
* var bar = new SecretBackendRole("bar", SecretBackendRoleArgs.builder()
* .name("otp-role")
* .backend(example.path())
* .keyType("otp")
* .defaultUser("default")
* .allowedUsers("default,baz")
* .cidrList("0.0.0.0/0")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: vault:Mount
* properties:
* type: ssh
* foo:
* type: vault:ssh:SecretBackendRole
* properties:
* name: my-role
* backend: ${example.path}
* keyType: ca
* allowUserCertificates: true
* bar:
* type: vault:ssh:SecretBackendRole
* properties:
* name: otp-role
* backend: ${example.path}
* keyType: otp
* defaultUser: default
* allowedUsers: default,baz
* cidrList: 0.0.0.0/0
* ```
*
* ## Import
* SSH secret backend roles can be imported using the `path`, e.g.
* ```sh
* $ pulumi import vault:ssh/secretBackendRole:SecretBackendRole foo ssh/roles/my-role
* ```
* @property algorithmSigner When supplied, this value specifies a signing algorithm for the key. Possible values: ssh-rsa, rsa-sha2-256, rsa-sha2-512.
* @property allowBareDomains Specifies if host certificates that are requested are allowed to use the base domains listed in `allowed_domains`.
* @property allowHostCertificates Specifies if certificates are allowed to be signed for use as a 'host'.
* @property allowSubdomains Specifies if host certificates that are requested are allowed to be subdomains of those listed in `allowed_domains`.
* @property allowUserCertificates Specifies if certificates are allowed to be signed for use as a 'user'.
* @property allowUserKeyIds Specifies if users can override the key ID for a signed certificate with the `key_id` field.
* @property allowedCriticalOptions Specifies a comma-separated list of critical options that certificates can have when signed.
* @property allowedDomains The list of domains for which a client can request a host certificate.
* @property allowedDomainsTemplate Specifies if `allowed_domains` can be declared using
* identity template policies. Non-templated domains are also permitted.
* @property allowedExtensions Specifies a comma-separated list of extensions that certificates can have when signed.
* @property allowedUserKeyConfigs Set of configuration blocks to define allowed
* user key configuration, like key type and their lengths. Can be specified multiple times.
* *See Configuration-Options for more info*
* @property allowedUsers Specifies a comma-separated list of usernames that are to be allowed, only if certain usernames are to be allowed.
* @property allowedUsersTemplate Specifies if `allowed_users` can be declared using identity template policies. Non-templated users are also permitted.
* @property backend The path where the SSH secret backend is mounted.
* @property cidrList The comma-separated string of CIDR blocks for which this role is applicable.
* @property defaultCriticalOptions Specifies a map of critical options that certificates have when signed.
* @property defaultExtensions Specifies a map of extensions that certificates have when signed.
* @property defaultUser Specifies the default username for which a credential will be generated.
* @property defaultUserTemplate If set, `default_users` can be specified using identity template values. A non-templated user is also permitted.
* @property keyIdFormat Specifies a custom format for the key id of a signed certificate.
* @property keyType Specifies the type of credentials generated by this role. This can be either `otp`, `dynamic` or `ca`.
* @property maxTtl Specifies the maximum Time To Live value.
* @property name Specifies the name of the role to create.
* @property namespace 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](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* *Available only for Vault Enterprise*.
* @property notBeforeDuration Specifies the duration by which to backdate the ValidAfter property. Uses duration format strings.
* @property ttl Specifies the Time To Live value.
*/
public data class SecretBackendRoleArgs(
public val algorithmSigner: Output? = null,
public val allowBareDomains: Output? = null,
public val allowHostCertificates: Output? = null,
public val allowSubdomains: Output? = null,
public val allowUserCertificates: Output? = null,
public val allowUserKeyIds: Output? = null,
public val allowedCriticalOptions: Output? = null,
public val allowedDomains: Output? = null,
public val allowedDomainsTemplate: Output? = null,
public val allowedExtensions: Output? = null,
public val allowedUserKeyConfigs: Output>? = null,
public val allowedUsers: Output? = null,
public val allowedUsersTemplate: Output? = null,
public val backend: Output? = null,
public val cidrList: Output? = null,
public val defaultCriticalOptions: Output