vault.aws.SecretBackendStaticRole
Explore with Pulumi AI
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
Example Usage
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,
Username = "my-test-user",
RotationPeriod = 3600,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v5/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,
Username: pulumi.String("my-test-user"),
RotationPeriod: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
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())
.username("my-test-user")
.rotationPeriod("3600")
.build());
}
}
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,
username="my-test-user",
rotation_period=3600)
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,
username: "my-test-user",
rotationPeriod: 3600,
});
resources:
aws:
type: vault:aws:SecretBackend
properties:
path: my-aws
description: Obtain AWS credentials.
role:
type: vault:aws:SecretBackendStaticRole
properties:
backend: ${aws.path}
username: my-test-user
rotationPeriod: '3600'
Create SecretBackendStaticRole Resource
new SecretBackendStaticRole(name: string, args: SecretBackendStaticRoleArgs, opts?: CustomResourceOptions);
@overload
def SecretBackendStaticRole(resource_name: 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)
@overload
def SecretBackendStaticRole(resource_name: str,
args: SecretBackendStaticRoleArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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.
Package Details
- Repository
- Vault pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vault
Terraform Provider.