AuthBackendRoleSecretID

Manages an AppRole auth backend SecretID in a Vault server. See the Vault documentation for more information.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var approle = new Vault.AuthBackend("approle", new Vault.AuthBackendArgs
        {
            Type = "approle",
        });
        var example = new Vault.AppRole.AuthBackendRole("example", new Vault.AppRole.AuthBackendRoleArgs
        {
            Backend = approle.Path,
            Policies = 
            {
                "default",
                "dev",
                "prod",
            },
            RoleName = "test-role",
        });
        var id = new Vault.AppRole.AuthBackendRoleSecretID("id", new Vault.AppRole.AuthBackendRoleSecretIDArgs
        {
            Backend = approle.Path,
            Metadata = @"{
  ""hello"": ""world""
}

",
            RoleName = example.RoleName,
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault"
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault/appRole"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		approle, err := vault.NewAuthBackend(ctx, "approle", &vault.AuthBackendArgs{
			Type: pulumi.String("approle"),
		})
		if err != nil {
			return err
		}
		example, err := appRole.NewAuthBackendRole(ctx, "example", &appRole.AuthBackendRoleArgs{
			Backend: approle.Path,
			Policies: pulumi.StringArray{
				pulumi.String("default"),
				pulumi.String("dev"),
				pulumi.String("prod"),
			},
			RoleName: pulumi.String("test-role"),
		})
		if err != nil {
			return err
		}
		_, err = appRole.NewAuthBackendRoleSecretID(ctx, "id", &appRole.AuthBackendRoleSecretIDArgs{
			Backend:  approle.Path,
			Metadata: pulumi.String(fmt.Sprintf("%v%v%v%v", "{\n", "  \"hello\": \"world\"\n", "}\n", "\n")),
			RoleName: example.RoleName,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_vault as vault

approle = vault.AuthBackend("approle", type="approle")
example = vault.app_role.AuthBackendRole("example",
    backend=approle.path,
    policies=[
        "default",
        "dev",
        "prod",
    ],
    role_name="test-role")
id = vault.app_role.AuthBackendRoleSecretID("id",
    backend=approle.path,
    metadata="""{
  "hello": "world"
}

""",
    role_name=example.role_name)
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const approle = new vault.AuthBackend("approle", {
    type: "approle",
});
const example = new vault.appRole.AuthBackendRole("example", {
    backend: approle.path,
    policies: [
        "default",
        "dev",
        "prod",
    ],
    roleName: "test-role",
});
const id = new vault.appRole.AuthBackendRoleSecretID("id", {
    backend: approle.path,
    metadata: `{
  "hello": "world"
}
`,
    roleName: example.roleName,
});

Create a AuthBackendRoleSecretID Resource

new AuthBackendRoleSecretID(name: string, args: AuthBackendRoleSecretIDArgs, opts?: CustomResourceOptions);
@overload
def AuthBackendRoleSecretID(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            backend: Optional[str] = None,
                            cidr_lists: Optional[Sequence[str]] = None,
                            metadata: Optional[str] = None,
                            role_name: Optional[str] = None,
                            secret_id: Optional[str] = None,
                            wrapping_ttl: Optional[str] = None)
@overload
def AuthBackendRoleSecretID(resource_name: str,
                            args: AuthBackendRoleSecretIDArgs,
                            opts: Optional[ResourceOptions] = None)
func NewAuthBackendRoleSecretID(ctx *Context, name string, args AuthBackendRoleSecretIDArgs, opts ...ResourceOption) (*AuthBackendRoleSecretID, error)
public AuthBackendRoleSecretID(string name, AuthBackendRoleSecretIDArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AuthBackendRoleSecretIDArgs
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 AuthBackendRoleSecretIDArgs
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 AuthBackendRoleSecretIDArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthBackendRoleSecretIDArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthBackendRoleSecretID Resource Properties

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

Inputs

The AuthBackendRoleSecretID resource accepts the following input properties:

RoleName string
The name of the role to create the SecretID for.
Backend string
Unique name of the auth backend to configure.
CidrLists List<string>
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
Metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
SecretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
WrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
RoleName string
The name of the role to create the SecretID for.
Backend string
Unique name of the auth backend to configure.
CidrLists []string
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
Metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
SecretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
WrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
roleName string
The name of the role to create the SecretID for.
backend string
Unique name of the auth backend to configure.
cidrLists string[]
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
secretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
role_name str
The name of the role to create the SecretID for.
backend str
Unique name of the auth backend to configure.
cidr_lists Sequence[str]
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata str
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
secret_id str
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrapping_ttl str
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.

Outputs

All input properties are implicitly available as output properties. Additionally, the AuthBackendRoleSecretID resource produces the following output properties:

Accessor string
The unique ID for this SecretID that can be safely logged.
Id string
The provider-assigned unique ID for this managed resource.
WrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
WrappingToken string
The token used to retrieve a response-wrapped SecretID.
Accessor string
The unique ID for this SecretID that can be safely logged.
Id string
The provider-assigned unique ID for this managed resource.
WrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
WrappingToken string
The token used to retrieve a response-wrapped SecretID.
accessor string
The unique ID for this SecretID that can be safely logged.
id string
The provider-assigned unique ID for this managed resource.
wrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
wrappingToken string
The token used to retrieve a response-wrapped SecretID.
accessor str
The unique ID for this SecretID that can be safely logged.
id str
The provider-assigned unique ID for this managed resource.
wrapping_accessor str
The unique ID for the response-wrapped SecretID that can be safely logged.
wrapping_token str
The token used to retrieve a response-wrapped SecretID.

Look up an Existing AuthBackendRoleSecretID Resource

Get an existing AuthBackendRoleSecretID 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?: AuthBackendRoleSecretIDState, opts?: CustomResourceOptions): AuthBackendRoleSecretID
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accessor: Optional[str] = None,
        backend: Optional[str] = None,
        cidr_lists: Optional[Sequence[str]] = None,
        metadata: Optional[str] = None,
        role_name: Optional[str] = None,
        secret_id: Optional[str] = None,
        wrapping_accessor: Optional[str] = None,
        wrapping_token: Optional[str] = None,
        wrapping_ttl: Optional[str] = None) -> AuthBackendRoleSecretID
func GetAuthBackendRoleSecretID(ctx *Context, name string, id IDInput, state *AuthBackendRoleSecretIDState, opts ...ResourceOption) (*AuthBackendRoleSecretID, error)
public static AuthBackendRoleSecretID Get(string name, Input<string> id, AuthBackendRoleSecretIDState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Accessor string
The unique ID for this SecretID that can be safely logged.
Backend string
Unique name of the auth backend to configure.
CidrLists List<string>
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
Metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
RoleName string
The name of the role to create the SecretID for.
SecretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
WrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
WrappingToken string
The token used to retrieve a response-wrapped SecretID.
WrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
Accessor string
The unique ID for this SecretID that can be safely logged.
Backend string
Unique name of the auth backend to configure.
CidrLists []string
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
Metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
RoleName string
The name of the role to create the SecretID for.
SecretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
WrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
WrappingToken string
The token used to retrieve a response-wrapped SecretID.
WrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
accessor string
The unique ID for this SecretID that can be safely logged.
backend string
Unique name of the auth backend to configure.
cidrLists string[]
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata string
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
roleName string
The name of the role to create the SecretID for.
secretId string
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrappingAccessor string
The unique ID for the response-wrapped SecretID that can be safely logged.
wrappingToken string
The token used to retrieve a response-wrapped SecretID.
wrappingTtl string
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.
accessor str
The unique ID for this SecretID that can be safely logged.
backend str
Unique name of the auth backend to configure.
cidr_lists Sequence[str]
If set, specifies blocks of IP addresses which can perform the login operation using this SecretID.
metadata str
A JSON-encoded string containing metadata in key-value pairs to be set on tokens issued with this SecretID.
role_name str
The name of the role to create the SecretID for.
secret_id str
The SecretID to be created. If set, uses “Push” mode. Defaults to Vault auto-generating SecretIDs.
wrapping_accessor str
The unique ID for the response-wrapped SecretID that can be safely logged.
wrapping_token str
The token used to retrieve a response-wrapped SecretID.
wrapping_ttl str
If set, the SecretID response will be response-wrapped and available for the duration specified. Only a single unwrapping of the token is allowed.

Package Details

Repository
https://github.com/pulumi/pulumi-vault
License
Apache-2.0
Notes
This Pulumi package is based on the vault Terraform Provider.