vault.aws.SecretBackendStaticRole
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const aws = new vault.aws.SecretBackend("aws", {
path: "my-aws",
description: "Obtain AWS credentials.",
});
const role = new vault.aws.SecretBackendStaticRole("role", {
backend: aws.path,
name: "test",
username: "my-test-user",
rotationPeriod: 3600,
});
import pulumi
import pulumi_vault as vault
aws = vault.aws.SecretBackend("aws",
path="my-aws",
description="Obtain AWS credentials.")
role = vault.aws.SecretBackendStaticRole("role",
backend=aws.path,
name="test",
username="my-test-user",
rotation_period=3600)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/aws"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
aws, err := aws.NewSecretBackend(ctx, "aws", &aws.SecretBackendArgs{
Path: pulumi.String("my-aws"),
Description: pulumi.String("Obtain AWS credentials."),
})
if err != nil {
return err
}
_, err = aws.NewSecretBackendStaticRole(ctx, "role", &aws.SecretBackendStaticRoleArgs{
Backend: aws.Path,
Name: pulumi.String("test"),
Username: pulumi.String("my-test-user"),
RotationPeriod: pulumi.Int(3600),
})
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 aws = new Vault.Aws.SecretBackend("aws", new()
{
Path = "my-aws",
Description = "Obtain AWS credentials.",
});
var role = new Vault.Aws.SecretBackendStaticRole("role", new()
{
Backend = aws.Path,
Name = "test",
Username = "my-test-user",
RotationPeriod = 3600,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.aws.SecretBackend;
import com.pulumi.vault.aws.SecretBackendArgs;
import com.pulumi.vault.aws.SecretBackendStaticRole;
import com.pulumi.vault.aws.SecretBackendStaticRoleArgs;
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 aws = new SecretBackend("aws", SecretBackendArgs.builder()
.path("my-aws")
.description("Obtain AWS credentials.")
.build());
var role = new SecretBackendStaticRole("role", SecretBackendStaticRoleArgs.builder()
.backend(aws.path())
.name("test")
.username("my-test-user")
.rotationPeriod("3600")
.build());
}
}
resources:
aws:
type: vault:aws:SecretBackend
properties:
path: my-aws
description: Obtain AWS credentials.
role:
type: vault:aws:SecretBackendStaticRole
properties:
backend: ${aws.path}
name: test
username: my-test-user
rotationPeriod: '3600'
Create SecretBackendStaticRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretBackendStaticRole(name: string, args: SecretBackendStaticRoleArgs, opts?: CustomResourceOptions);
@overload
def SecretBackendStaticRole(resource_name: str,
args: SecretBackendStaticRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecretBackendStaticRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
rotation_period: Optional[int] = None,
username: Optional[str] = None,
backend: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None)
func NewSecretBackendStaticRole(ctx *Context, name string, args SecretBackendStaticRoleArgs, opts ...ResourceOption) (*SecretBackendStaticRole, error)
public SecretBackendStaticRole(string name, SecretBackendStaticRoleArgs args, CustomResourceOptions? opts = null)
public SecretBackendStaticRole(String name, SecretBackendStaticRoleArgs args)
public SecretBackendStaticRole(String name, SecretBackendStaticRoleArgs args, CustomResourceOptions options)
type: vault:aws:SecretBackendStaticRole
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecretBackendStaticRoleArgs
- 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 SecretBackendStaticRoleArgs
- 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 SecretBackendStaticRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretBackendStaticRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretBackendStaticRoleArgs
- 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 secretBackendStaticRoleResource = new Vault.Aws.SecretBackendStaticRole("secretBackendStaticRoleResource", new()
{
RotationPeriod = 0,
Username = "string",
Backend = "string",
Name = "string",
Namespace = "string",
});
example, err := aws.NewSecretBackendStaticRole(ctx, "secretBackendStaticRoleResource", &aws.SecretBackendStaticRoleArgs{
RotationPeriod: pulumi.Int(0),
Username: pulumi.String("string"),
Backend: pulumi.String("string"),
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
})
var secretBackendStaticRoleResource = new SecretBackendStaticRole("secretBackendStaticRoleResource", SecretBackendStaticRoleArgs.builder()
.rotationPeriod(0)
.username("string")
.backend("string")
.name("string")
.namespace("string")
.build());
secret_backend_static_role_resource = vault.aws.SecretBackendStaticRole("secretBackendStaticRoleResource",
rotation_period=0,
username="string",
backend="string",
name="string",
namespace="string")
const secretBackendStaticRoleResource = new vault.aws.SecretBackendStaticRole("secretBackendStaticRoleResource", {
rotationPeriod: 0,
username: "string",
backend: "string",
name: "string",
namespace: "string",
});
type: vault:aws:SecretBackendStaticRole
properties:
backend: string
name: string
namespace: string
rotationPeriod: 0
username: string
SecretBackendStaticRole Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecretBackendStaticRole resource accepts the following input properties:
- Rotation
Period int - How often Vault should rotate the password of the user entry.
- Username string
- The username of the existing AWS IAM to manage password rotation for.
- Backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- Name string
- The name to identify this role within the backend. Must be unique within the backend.
- Namespace string
- 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.
- Rotation
Period int - How often Vault should rotate the password of the user entry.
- Username string
- The username of the existing AWS IAM to manage password rotation for.
- Backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- Name string
- The name to identify this role within the backend. Must be unique within the backend.
- Namespace string
- 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.
- rotation
Period Integer - How often Vault should rotate the password of the user entry.
- username String
- The username of the existing AWS IAM to manage password rotation for.
- backend String
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name String
- The name to identify this role within the backend. Must be unique within the backend.
- namespace String
- 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.
- rotation
Period number - How often Vault should rotate the password of the user entry.
- username string
- The username of the existing AWS IAM to manage password rotation for.
- backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name string
- The name to identify this role within the backend. Must be unique within the backend.
- namespace string
- 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.
- rotation_
period int - How often Vault should rotate the password of the user entry.
- username str
- The username of the existing AWS IAM to manage password rotation for.
- backend str
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name str
- The name to identify this role within the backend. Must be unique within the backend.
- namespace str
- 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.
- rotation
Period Number - How often Vault should rotate the password of the user entry.
- username String
- The username of the existing AWS IAM to manage password rotation for.
- backend String
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name String
- The name to identify this role within the backend. Must be unique within the backend.
- namespace String
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretBackendStaticRole 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 SecretBackendStaticRole Resource
Get an existing SecretBackendStaticRole 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?: SecretBackendStaticRoleState, opts?: CustomResourceOptions): SecretBackendStaticRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
rotation_period: Optional[int] = None,
username: Optional[str] = None) -> SecretBackendStaticRole
func GetSecretBackendStaticRole(ctx *Context, name string, id IDInput, state *SecretBackendStaticRoleState, opts ...ResourceOption) (*SecretBackendStaticRole, error)
public static SecretBackendStaticRole Get(string name, Input<string> id, SecretBackendStaticRoleState? state, CustomResourceOptions? opts = null)
public static SecretBackendStaticRole get(String name, Output<String> id, SecretBackendStaticRoleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- Name string
- The name to identify this role within the backend. Must be unique within the backend.
- Namespace string
- 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. - Rotation
Period int - How often Vault should rotate the password of the user entry.
- Username string
- The username of the existing AWS IAM to manage password rotation for.
- Backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- Name string
- The name to identify this role within the backend. Must be unique within the backend.
- Namespace string
- 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. - Rotation
Period int - How often Vault should rotate the password of the user entry.
- Username string
- The username of the existing AWS IAM to manage password rotation for.
- backend String
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name String
- The name to identify this role within the backend. Must be unique within the backend.
- namespace String
- 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. - rotation
Period Integer - How often Vault should rotate the password of the user entry.
- username String
- The username of the existing AWS IAM to manage password rotation for.
- backend string
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name string
- The name to identify this role within the backend. Must be unique within the backend.
- namespace string
- 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. - rotation
Period number - How often Vault should rotate the password of the user entry.
- username string
- The username of the existing AWS IAM to manage password rotation for.
- backend str
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name str
- The name to identify this role within the backend. Must be unique within the backend.
- namespace str
- 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. - rotation_
period int - How often Vault should rotate the password of the user entry.
- username str
- The username of the existing AWS IAM to manage password rotation for.
- backend String
- The unique path this backend should be mounted at. Must
not begin or end with a
/
. Defaults toaws
- name String
- The name to identify this role within the backend. Must be unique within the backend.
- namespace String
- 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. - rotation
Period Number - How often Vault should rotate the password of the user entry.
- username String
- The username of the existing AWS IAM to manage password rotation for.
Import
AWS secret backend static role can be imported using the full path to the role
of the form: <mount_path>/static-roles/<role_name>
e.g.
$ pulumi import vault:aws/secretBackendStaticRole:SecretBackendStaticRole role aws/static-roles/example-role
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.