Transformation

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

It creates or updates a transformation with the given name. If a transformation with the name does not exist, it will be created. If the transformation 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.Transformation("test", new Vault.Transform.TransformationArgs
        {
            Path = mountTransform.Path,
            Type = "fpe",
            Template = "ccn",
            TweakSource = "internal",
            AllowedRoles = 
            {
                "payments",
            },
        });
    }

}
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.NewTransformation(ctx, "test", &transform.TransformationArgs{
			Path:        mountTransform.Path,
			Type:        pulumi.String("fpe"),
			Template:    pulumi.String("ccn"),
			TweakSource: pulumi.String("internal"),
			AllowedRoles: pulumi.StringArray{
				pulumi.String("payments"),
			},
		})
		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.Transformation("test",
    path=mount_transform.path,
    type="fpe",
    template="ccn",
    tweak_source="internal",
    allowed_roles=["payments"])
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.Transformation("test", {
    path: mountTransform.path,
    type: "fpe",
    template: "ccn",
    tweakSource: "internal",
    allowedRoles: ["payments"],
});

Create a Transformation Resource

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

Transformation Resource Properties

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

Inputs

The Transformation resource accepts the following input properties:

Path string
Path to where the back-end is mounted within Vault.
AllowedRoles List<string>
The set of roles allowed to perform this transformation.
MaskingCharacter string
The character used to replace data when in masking mode
Name string
The name of the transformation.
Template string
The name of the template to use.
Templates List<string>
Templates configured for transformation.
TweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
Type string
The type of transformation to perform.
Path string
Path to where the back-end is mounted within Vault.
AllowedRoles []string
The set of roles allowed to perform this transformation.
MaskingCharacter string
The character used to replace data when in masking mode
Name string
The name of the transformation.
Template string
The name of the template to use.
Templates []string
Templates configured for transformation.
TweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
Type string
The type of transformation to perform.
path string
Path to where the back-end is mounted within Vault.
allowedRoles string[]
The set of roles allowed to perform this transformation.
maskingCharacter string
The character used to replace data when in masking mode
name string
The name of the transformation.
template string
The name of the template to use.
templates string[]
Templates configured for transformation.
tweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
type string
The type of transformation to perform.
path str
Path to where the back-end is mounted within Vault.
allowed_roles Sequence[str]
The set of roles allowed to perform this transformation.
masking_character str
The character used to replace data when in masking mode
name str
The name of the transformation.
template str
The name of the template to use.
templates Sequence[str]
Templates configured for transformation.
tweak_source str
The source of where the tweak value comes from. Only valid when in FPE mode.
type str
The type of transformation to perform.

Outputs

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

Get an existing Transformation 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?: TransformationState, opts?: CustomResourceOptions): Transformation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allowed_roles: Optional[Sequence[str]] = None,
        masking_character: Optional[str] = None,
        name: Optional[str] = None,
        path: Optional[str] = None,
        template: Optional[str] = None,
        templates: Optional[Sequence[str]] = None,
        tweak_source: Optional[str] = None,
        type: Optional[str] = None) -> Transformation
func GetTransformation(ctx *Context, name string, id IDInput, state *TransformationState, opts ...ResourceOption) (*Transformation, error)
public static Transformation Get(string name, Input<string> id, TransformationState? 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:

AllowedRoles List<string>
The set of roles allowed to perform this transformation.
MaskingCharacter string
The character used to replace data when in masking mode
Name string
The name of the transformation.
Path string
Path to where the back-end is mounted within Vault.
Template string
The name of the template to use.
Templates List<string>
Templates configured for transformation.
TweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
Type string
The type of transformation to perform.
AllowedRoles []string
The set of roles allowed to perform this transformation.
MaskingCharacter string
The character used to replace data when in masking mode
Name string
The name of the transformation.
Path string
Path to where the back-end is mounted within Vault.
Template string
The name of the template to use.
Templates []string
Templates configured for transformation.
TweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
Type string
The type of transformation to perform.
allowedRoles string[]
The set of roles allowed to perform this transformation.
maskingCharacter string
The character used to replace data when in masking mode
name string
The name of the transformation.
path string
Path to where the back-end is mounted within Vault.
template string
The name of the template to use.
templates string[]
Templates configured for transformation.
tweakSource string
The source of where the tweak value comes from. Only valid when in FPE mode.
type string
The type of transformation to perform.
allowed_roles Sequence[str]
The set of roles allowed to perform this transformation.
masking_character str
The character used to replace data when in masking mode
name str
The name of the transformation.
path str
Path to where the back-end is mounted within Vault.
template str
The name of the template to use.
templates Sequence[str]
Templates configured for transformation.
tweak_source str
The source of where the tweak value comes from. Only valid when in FPE mode.
type str
The type of transformation to perform.

Package Details

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