Role

This resource supports the “/transform/role/{name}” Vault endpoint.

It creates or updates the role with the given name. If a role with the name does not exist, it will be created. If the role exists, it will be updated with the new attributes.

Example Usage

using Pulumi;
using Vault = Pulumi.Vault;

class MyStack : Stack
{
    public MyStack()
    {
        var mountTransform = new Vault.Mount("mountTransform", new Vault.MountArgs
        {
            Path = "transform",
            Type = "transform",
        });
        var test = new Vault.Transform.Role("test", new Vault.Transform.RoleArgs
        {
            Path = mountTransform.Path,
            Transformations = 
            {
                "ccn-fpe",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault"
	"github.com/pulumi/pulumi-vault/sdk/v4/go/vault/transform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mountTransform, err := vault.NewMount(ctx, "mountTransform", &vault.MountArgs{
			Path: pulumi.String("transform"),
			Type: pulumi.String("transform"),
		})
		if err != nil {
			return err
		}
		_, err = transform.NewRole(ctx, "test", &transform.RoleArgs{
			Path: mountTransform.Path,
			Transformations: pulumi.StringArray{
				pulumi.String("ccn-fpe"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_vault as vault

mount_transform = vault.Mount("mountTransform",
    path="transform",
    type="transform")
test = vault.transform.Role("test",
    path=mount_transform.path,
    transformations=["ccn-fpe"])
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";

const mountTransform = new vault.Mount("mountTransform", {
    path: "transform",
    type: "transform",
});
const test = new vault.transform.Role("test", {
    path: mountTransform.path,
    transformations: ["ccn-fpe"],
});

Create a Role Resource

new Role(name: string, args: RoleArgs, opts?: CustomResourceOptions);
@overload
def Role(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         name: Optional[str] = None,
         path: Optional[str] = None,
         transformations: Optional[Sequence[str]] = None)
@overload
def Role(resource_name: str,
         args: RoleArgs,
         opts: Optional[ResourceOptions] = None)
func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)
public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RoleArgs
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 RoleArgs
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 RoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Role Resource Properties

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

Inputs

The Role resource accepts the following input properties:

Path string
Path to where the back-end is mounted within Vault.
Name string
The name of the role.
Transformations List<string>
A comma separated string or slice of transformations to use.
Path string
Path to where the back-end is mounted within Vault.
Name string
The name of the role.
Transformations []string
A comma separated string or slice of transformations to use.
path string
Path to where the back-end is mounted within Vault.
name string
The name of the role.
transformations string[]
A comma separated string or slice of transformations to use.
path str
Path to where the back-end is mounted within Vault.
name str
The name of the role.
transformations Sequence[str]
A comma separated string or slice of transformations to use.

Outputs

All input properties are implicitly available as output properties. Additionally, the Role 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing Role Resource

Get an existing Role 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?: RoleState, opts?: CustomResourceOptions): Role
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        path: Optional[str] = None,
        transformations: Optional[Sequence[str]] = None) -> Role
func GetRole(ctx *Context, name string, id IDInput, state *RoleState, opts ...ResourceOption) (*Role, error)
public static Role Get(string name, Input<string> id, RoleState? 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:

Name string
The name of the role.
Path string
Path to where the back-end is mounted within Vault.
Transformations List<string>
A comma separated string or slice of transformations to use.
Name string
The name of the role.
Path string
Path to where the back-end is mounted within Vault.
Transformations []string
A comma separated string or slice of transformations to use.
name string
The name of the role.
path string
Path to where the back-end is mounted within Vault.
transformations string[]
A comma separated string or slice of transformations to use.
name str
The name of the role.
path str
Path to where the back-end is mounted within Vault.
transformations Sequence[str]
A comma separated string or slice of transformations to use.

Package Details

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