SecretBackendRole

Import

Database secret backend roles can be imported using the backend, /roles/, and the name e.g.

 $ pulumi import vault:database/secretBackendRole:SecretBackendRole example postgres/roles/my-role

Create a SecretBackendRole Resource

new SecretBackendRole(name: string, args: SecretBackendRoleArgs, opts?: CustomResourceOptions);
@overload
def SecretBackendRole(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      backend: Optional[str] = None,
                      creation_statements: Optional[Sequence[str]] = None,
                      db_name: Optional[str] = None,
                      default_ttl: Optional[int] = None,
                      max_ttl: Optional[int] = None,
                      name: Optional[str] = None,
                      renew_statements: Optional[Sequence[str]] = None,
                      revocation_statements: Optional[Sequence[str]] = None,
                      rollback_statements: Optional[Sequence[str]] = None)
@overload
def SecretBackendRole(resource_name: str,
                      args: SecretBackendRoleArgs,
                      opts: Optional[ResourceOptions] = None)
func NewSecretBackendRole(ctx *Context, name string, args SecretBackendRoleArgs, opts ...ResourceOption) (*SecretBackendRole, error)
public SecretBackendRole(string name, SecretBackendRoleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SecretBackendRoleArgs
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 SecretBackendRoleArgs
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 SecretBackendRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SecretBackendRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SecretBackendRole 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 SecretBackendRole resource accepts the following input properties:

Backend string
The unique name of the Vault mount to configure.
CreationStatements List<string>
The database statements to execute when creating a user.
DbName string
The unique name of the database connection to use for the role.
DefaultTtl int
The default number of seconds for leases for this role.
MaxTtl int
The maximum number of seconds for leases for this role.
Name string
A unique name to give the role.
RenewStatements List<string>
The database statements to execute when renewing a user.
RevocationStatements List<string>
The database statements to execute when revoking a user.
RollbackStatements List<string>
The database statements to execute when rolling back creation due to an error.
Backend string
The unique name of the Vault mount to configure.
CreationStatements []string
The database statements to execute when creating a user.
DbName string
The unique name of the database connection to use for the role.
DefaultTtl int
The default number of seconds for leases for this role.
MaxTtl int
The maximum number of seconds for leases for this role.
Name string
A unique name to give the role.
RenewStatements []string
The database statements to execute when renewing a user.
RevocationStatements []string
The database statements to execute when revoking a user.
RollbackStatements []string
The database statements to execute when rolling back creation due to an error.
backend string
The unique name of the Vault mount to configure.
creationStatements string[]
The database statements to execute when creating a user.
dbName string
The unique name of the database connection to use for the role.
defaultTtl number
The default number of seconds for leases for this role.
maxTtl number
The maximum number of seconds for leases for this role.
name string
A unique name to give the role.
renewStatements string[]
The database statements to execute when renewing a user.
revocationStatements string[]
The database statements to execute when revoking a user.
rollbackStatements string[]
The database statements to execute when rolling back creation due to an error.
backend str
The unique name of the Vault mount to configure.
creation_statements Sequence[str]
The database statements to execute when creating a user.
db_name str
The unique name of the database connection to use for the role.
default_ttl int
The default number of seconds for leases for this role.
max_ttl int
The maximum number of seconds for leases for this role.
name str
A unique name to give the role.
renew_statements Sequence[str]
The database statements to execute when renewing a user.
revocation_statements Sequence[str]
The database statements to execute when revoking a user.
rollback_statements Sequence[str]
The database statements to execute when rolling back creation due to an error.

Outputs

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

Get an existing SecretBackendRole 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?: SecretBackendRoleState, opts?: CustomResourceOptions): SecretBackendRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend: Optional[str] = None,
        creation_statements: Optional[Sequence[str]] = None,
        db_name: Optional[str] = None,
        default_ttl: Optional[int] = None,
        max_ttl: Optional[int] = None,
        name: Optional[str] = None,
        renew_statements: Optional[Sequence[str]] = None,
        revocation_statements: Optional[Sequence[str]] = None,
        rollback_statements: Optional[Sequence[str]] = None) -> SecretBackendRole
func GetSecretBackendRole(ctx *Context, name string, id IDInput, state *SecretBackendRoleState, opts ...ResourceOption) (*SecretBackendRole, error)
public static SecretBackendRole Get(string name, Input<string> id, SecretBackendRoleState? 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:

Backend string
The unique name of the Vault mount to configure.
CreationStatements List<string>
The database statements to execute when creating a user.
DbName string
The unique name of the database connection to use for the role.
DefaultTtl int
The default number of seconds for leases for this role.
MaxTtl int
The maximum number of seconds for leases for this role.
Name string
A unique name to give the role.
RenewStatements List<string>
The database statements to execute when renewing a user.
RevocationStatements List<string>
The database statements to execute when revoking a user.
RollbackStatements List<string>
The database statements to execute when rolling back creation due to an error.
Backend string
The unique name of the Vault mount to configure.
CreationStatements []string
The database statements to execute when creating a user.
DbName string
The unique name of the database connection to use for the role.
DefaultTtl int
The default number of seconds for leases for this role.
MaxTtl int
The maximum number of seconds for leases for this role.
Name string
A unique name to give the role.
RenewStatements []string
The database statements to execute when renewing a user.
RevocationStatements []string
The database statements to execute when revoking a user.
RollbackStatements []string
The database statements to execute when rolling back creation due to an error.
backend string
The unique name of the Vault mount to configure.
creationStatements string[]
The database statements to execute when creating a user.
dbName string
The unique name of the database connection to use for the role.
defaultTtl number
The default number of seconds for leases for this role.
maxTtl number
The maximum number of seconds for leases for this role.
name string
A unique name to give the role.
renewStatements string[]
The database statements to execute when renewing a user.
revocationStatements string[]
The database statements to execute when revoking a user.
rollbackStatements string[]
The database statements to execute when rolling back creation due to an error.
backend str
The unique name of the Vault mount to configure.
creation_statements Sequence[str]
The database statements to execute when creating a user.
db_name str
The unique name of the database connection to use for the role.
default_ttl int
The default number of seconds for leases for this role.
max_ttl int
The maximum number of seconds for leases for this role.
name str
A unique name to give the role.
renew_statements Sequence[str]
The database statements to execute when renewing a user.
revocation_statements Sequence[str]
The database statements to execute when revoking a user.
rollback_statements Sequence[str]
The database statements to execute when rolling back creation due to an error.

Package Details

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