SecretBackendRole
Manages a Consul secrets role for a Consul secrets engine in Vault. Consul secret backends can then issue Consul tokens.
Example Usage
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var test = new Vault.Consul.SecretBackend("test", new Vault.Consul.SecretBackendArgs
{
Path = "consul",
Description = "Manages the Consul backend",
Address = "127.0.0.1:8500",
Token = "4240861b-ce3d-8530-115a-521ff070dd29",
});
var example = new Vault.Consul.SecretBackendRole("example", new Vault.Consul.SecretBackendRoleArgs
{
Backend = test.Path,
Policies =
{
"example-policy",
},
});
}
}
Coming soon!
import pulumi
import pulumi_vault as vault
test = vault.consul.SecretBackend("test",
path="consul",
description="Manages the Consul backend",
address="127.0.0.1:8500",
token="4240861b-ce3d-8530-115a-521ff070dd29")
example = vault.consul.SecretBackendRole("example",
backend=test.path,
policies=["example-policy"])import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const test = new vault.consul.SecretBackend("test", {
path: "consul",
description: "Manages the Consul backend",
address: "127.0.0.1:8500",
token: "4240861b-ce3d-8530-115a-521ff070dd29",
});
const example = new vault.consul.SecretBackendRole("example", {
backend: test.path,
policies: ["example-policy"],
});Create a SecretBackendRole Resource
new SecretBackendRole(name: string, args: SecretBackendRoleArgs, opts?: CustomResourceOptions);def SecretBackendRole(resource_name, opts=None, backend=None, local=None, max_ttl=None, name=None, path=None, policies=None, token_type=None, ttl=None, __props__=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.
- opts ResourceOptions
- A bag of options that control this 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 Programming Model docs.
Inputs
The SecretBackendRole resource accepts the following input properties:
- Policies List<string>
The list of Consul ACL policies to associate with these roles.
- Backend string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- Local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- Max
Ttl int Maximum TTL for leases associated with this role, in seconds.
- Name string
The name of the Consul secrets engine role to create.
- Path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- Token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- Ttl int
Specifies the TTL for this role.
- Policies []string
The list of Consul ACL policies to associate with these roles.
- Backend string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- Local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- Max
Ttl int Maximum TTL for leases associated with this role, in seconds.
- Name string
The name of the Consul secrets engine role to create.
- Path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- Token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- Ttl int
Specifies the TTL for this role.
- policies string[]
The list of Consul ACL policies to associate with these roles.
- backend string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- local boolean
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- max
Ttl number Maximum TTL for leases associated with this role, in seconds.
- name string
The name of the Consul secrets engine role to create.
- path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- ttl number
Specifies the TTL for this role.
- policies List[str]
The list of Consul ACL policies to associate with these roles.
- backend str
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- max_
ttl float Maximum TTL for leases associated with this role, in seconds.
- name str
The name of the Consul secrets engine role to create.
- path str
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- token_
type str Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- ttl float
Specifies the TTL for this role.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretBackendRole resource produces the following output properties:
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): SecretBackendRolestatic get(resource_name, id, opts=None, backend=None, local=None, max_ttl=None, name=None, path=None, policies=None, token_type=None, ttl=None, __props__=None);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 an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- Local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- Max
Ttl int Maximum TTL for leases associated with this role, in seconds.
- Name string
The name of the Consul secrets engine role to create.
- Path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- Policies List<string>
The list of Consul ACL policies to associate with these roles.
- Token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- Ttl int
Specifies the TTL for this role.
- Backend string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- Local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- Max
Ttl int Maximum TTL for leases associated with this role, in seconds.
- Name string
The name of the Consul secrets engine role to create.
- Path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- Policies []string
The list of Consul ACL policies to associate with these roles.
- Token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- Ttl int
Specifies the TTL for this role.
- backend string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- local boolean
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- max
Ttl number Maximum TTL for leases associated with this role, in seconds.
- name string
The name of the Consul secrets engine role to create.
- path string
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- policies string[]
The list of Consul ACL policies to associate with these roles.
- token
Type string Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- ttl number
Specifies the TTL for this role.
- backend str
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. One ofpathorbackendis required.- local bool
Indicates that the token should not be replicated globally and instead be local to the current datacenter.
- max_
ttl float Maximum TTL for leases associated with this role, in seconds.
- name str
The name of the Consul secrets engine role to create.
- path str
The unique name of an existing Consul secrets backend mount. Must not begin or end with a
/. Deprecated- policies List[str]
The list of Consul ACL policies to associate with these roles.
- token_
type str Specifies the type of token to create when using this role. Valid values are “client” or “management”.
- ttl float
Specifies the TTL for this role.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vaultTerraform Provider.