SecretBackendRole
Creates a role on an PKI Secret Backend for Vault.
Example Usage
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var pki = new Vault.PkiSecret.SecretBackend("pki", new Vault.PkiSecret.SecretBackendArgs
{
DefaultLeaseTtlSeconds = 3600,
MaxLeaseTtlSeconds = 86400,
Path = "%s",
});
var role = new Vault.PkiSecret.SecretBackendRole("role", new Vault.PkiSecret.SecretBackendRoleArgs
{
Backend = pki.Path,
});
}
}
Coming soon!
import pulumi
import pulumi_vault as vault
pki = vault.pki_secret.SecretBackend("pki",
default_lease_ttl_seconds=3600,
max_lease_ttl_seconds=86400,
path="%s")
role = vault.pki_secret.SecretBackendRole("role", backend=pki.path)import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const pki = new vault.pkiSecret.SecretBackend("pki", {
defaultLeaseTtlSeconds: 3600,
maxLeaseTtlSeconds: 86400,
path: "%s",
});
const role = new vault.pkiSecret.SecretBackendRole("role", {
backend: pki.path,
});Create a SecretBackendRole Resource
new SecretBackendRole(name: string, args: SecretBackendRoleArgs, opts?: CustomResourceOptions);def SecretBackendRole(resource_name, opts=None, allow_any_name=None, allow_bare_domains=None, allow_glob_domains=None, allow_ip_sans=None, allow_localhost=None, allow_subdomains=None, allowed_domains=None, allowed_other_sans=None, allowed_uri_sans=None, backend=None, basic_constraints_valid_for_non_ca=None, client_flag=None, code_signing_flag=None, countries=None, email_protection_flag=None, enforce_hostnames=None, ext_key_usages=None, generate_lease=None, key_bits=None, key_type=None, key_usages=None, localities=None, max_ttl=None, name=None, no_store=None, not_before_duration=None, organization_unit=None, organizations=None, policy_identifiers=None, postal_codes=None, provinces=None, require_cn=None, server_flag=None, street_addresses=None, ttl=None, use_csr_common_name=None, use_csr_sans=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:
- Backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- Allow
Any boolName Flag to allow any name
- Allow
Bare boolDomains Flag to allow certificates matching the actual domain
- Allow
Glob boolDomains Flag to allow names containing glob patterns.
- Allow
Ip boolSans Flag to allow IP SANs
- Allow
Localhost bool Flag to allow certificates for localhost
- Allow
Subdomains bool Flag to allow certificates matching subdomains
- Allowed
Domains List<string> List of allowed domains for certificates
- Allowed
Other List<string>Sans Defines allowed custom SANs
- Allowed
Uri List<string>Sans Defines allowed URI SANs
- Basic
Constraints boolValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- Client
Flag bool Flag to specify certificates for client use
- Code
Signing boolFlag Flag to specify certificates for code signing use
- Countries List<string>
The country of generated certificates
- Email
Protection boolFlag Flag to specify certificates for email protection use
- Enforce
Hostnames bool Flag to allow only valid host names
- Ext
Key List<string>Usages Specify the allowed extended key usage constraint on issued certificates
- Generate
Lease bool Flag to generate leases with certificates
- Key
Bits int The number of bits of generated keys
- Key
Type string The type of generated keys
- Key
Usages List<string> Specify the allowed key usage constraint on issued certificates
- Localities List<string>
The locality of generated certificates
- Max
Ttl string The maximum TTL
- Name string
The name to identify this role within the backend. Must be unique within the backend.
- No
Store bool Flag to not store certificates in the storage backend
- Not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- Organization
Unit List<string> The organization unit of generated certificates
- Organizations List<string>
The organization of generated certificates
- Policy
Identifiers List<string> Specify the list of allowed policies IODs
- Postal
Codes List<string> The postal code of generated certificates
- Provinces List<string>
The province of generated certificates
- Require
Cn bool Flag to force CN usage
- Server
Flag bool Flag to specify certificates for server use
- Street
Addresses List<string> The street address of generated certificates
- Ttl string
The TTL
- Use
Csr boolCommon Name Flag to use the CN in the CSR
- Use
Csr boolSans Flag to use the SANs in the CSR
- Backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- Allow
Any boolName Flag to allow any name
- Allow
Bare boolDomains Flag to allow certificates matching the actual domain
- Allow
Glob boolDomains Flag to allow names containing glob patterns.
- Allow
Ip boolSans Flag to allow IP SANs
- Allow
Localhost bool Flag to allow certificates for localhost
- Allow
Subdomains bool Flag to allow certificates matching subdomains
- Allowed
Domains []string List of allowed domains for certificates
- Allowed
Other []stringSans Defines allowed custom SANs
- Allowed
Uri []stringSans Defines allowed URI SANs
- Basic
Constraints boolValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- Client
Flag bool Flag to specify certificates for client use
- Code
Signing boolFlag Flag to specify certificates for code signing use
- Countries []string
The country of generated certificates
- Email
Protection boolFlag Flag to specify certificates for email protection use
- Enforce
Hostnames bool Flag to allow only valid host names
- Ext
Key []stringUsages Specify the allowed extended key usage constraint on issued certificates
- Generate
Lease bool Flag to generate leases with certificates
- Key
Bits int The number of bits of generated keys
- Key
Type string The type of generated keys
- Key
Usages []string Specify the allowed key usage constraint on issued certificates
- Localities []string
The locality of generated certificates
- Max
Ttl string The maximum TTL
- Name string
The name to identify this role within the backend. Must be unique within the backend.
- No
Store bool Flag to not store certificates in the storage backend
- Not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- Organization
Unit []string The organization unit of generated certificates
- Organizations []string
The organization of generated certificates
- Policy
Identifiers []string Specify the list of allowed policies IODs
- Postal
Codes []string The postal code of generated certificates
- Provinces []string
The province of generated certificates
- Require
Cn bool Flag to force CN usage
- Server
Flag bool Flag to specify certificates for server use
- Street
Addresses []string The street address of generated certificates
- Ttl string
The TTL
- Use
Csr boolCommon Name Flag to use the CN in the CSR
- Use
Csr boolSans Flag to use the SANs in the CSR
- backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- allow
Any booleanName Flag to allow any name
- allow
Bare booleanDomains Flag to allow certificates matching the actual domain
- allow
Glob booleanDomains Flag to allow names containing glob patterns.
- allow
Ip booleanSans Flag to allow IP SANs
- allow
Localhost boolean Flag to allow certificates for localhost
- allow
Subdomains boolean Flag to allow certificates matching subdomains
- allowed
Domains string[] List of allowed domains for certificates
- allowed
Other string[]Sans Defines allowed custom SANs
- allowed
Uri string[]Sans Defines allowed URI SANs
- basic
Constraints booleanValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- client
Flag boolean Flag to specify certificates for client use
- code
Signing booleanFlag Flag to specify certificates for code signing use
- countries string[]
The country of generated certificates
- email
Protection booleanFlag Flag to specify certificates for email protection use
- enforce
Hostnames boolean Flag to allow only valid host names
- ext
Key string[]Usages Specify the allowed extended key usage constraint on issued certificates
- generate
Lease boolean Flag to generate leases with certificates
- key
Bits number The number of bits of generated keys
- key
Type string The type of generated keys
- key
Usages string[] Specify the allowed key usage constraint on issued certificates
- localities string[]
The locality of generated certificates
- max
Ttl string The maximum TTL
- name string
The name to identify this role within the backend. Must be unique within the backend.
- no
Store boolean Flag to not store certificates in the storage backend
- not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- organization
Unit string[] The organization unit of generated certificates
- organizations string[]
The organization of generated certificates
- policy
Identifiers string[] Specify the list of allowed policies IODs
- postal
Codes string[] The postal code of generated certificates
- provinces string[]
The province of generated certificates
- require
Cn boolean Flag to force CN usage
- server
Flag boolean Flag to specify certificates for server use
- street
Addresses string[] The street address of generated certificates
- ttl string
The TTL
- use
Csr booleanCommon Name Flag to use the CN in the CSR
- use
Csr booleanSans Flag to use the SANs in the CSR
- backend str
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- allow_
any_ boolname Flag to allow any name
- allow_
bare_ booldomains Flag to allow certificates matching the actual domain
- allow_
glob_ booldomains Flag to allow names containing glob patterns.
- allow_
ip_ boolsans Flag to allow IP SANs
- allow_
localhost bool Flag to allow certificates for localhost
- allow_
subdomains bool Flag to allow certificates matching subdomains
- allowed_
domains List[str] List of allowed domains for certificates
- allowed_
other_ List[str]sans Defines allowed custom SANs
- allowed_
uri_ List[str]sans Defines allowed URI SANs
- basic_
constraints_ boolvalid_ for_ non_ ca Flag to mark basic constraints valid when issuing non-CA certificates
- client_
flag bool Flag to specify certificates for client use
- code_
signing_ boolflag Flag to specify certificates for code signing use
- countries List[str]
The country of generated certificates
- email_
protection_ boolflag Flag to specify certificates for email protection use
- enforce_
hostnames bool Flag to allow only valid host names
- ext_
key_ List[str]usages Specify the allowed extended key usage constraint on issued certificates
- generate_
lease bool Flag to generate leases with certificates
- key_
bits float The number of bits of generated keys
- key_
type str The type of generated keys
- key_
usages List[str] Specify the allowed key usage constraint on issued certificates
- localities List[str]
The locality of generated certificates
- max_
ttl str The maximum TTL
- name str
The name to identify this role within the backend. Must be unique within the backend.
- no_
store bool Flag to not store certificates in the storage backend
- not_
before_ strduration Specifies the duration by which to backdate the NotBefore property.
- organization_
unit List[str] The organization unit of generated certificates
- organizations List[str]
The organization of generated certificates
- policy_
identifiers List[str] Specify the list of allowed policies IODs
- postal_
codes List[str] The postal code of generated certificates
- provinces List[str]
The province of generated certificates
- require_
cn bool Flag to force CN usage
- server_
flag bool Flag to specify certificates for server use
- street_
addresses List[str] The street address of generated certificates
- ttl str
The TTL
- use_
csr_ boolcommon_ name Flag to use the CN in the CSR
- use_
csr_ boolsans Flag to use the SANs in the CSR
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, allow_any_name=None, allow_bare_domains=None, allow_glob_domains=None, allow_ip_sans=None, allow_localhost=None, allow_subdomains=None, allowed_domains=None, allowed_other_sans=None, allowed_uri_sans=None, backend=None, basic_constraints_valid_for_non_ca=None, client_flag=None, code_signing_flag=None, countries=None, email_protection_flag=None, enforce_hostnames=None, ext_key_usages=None, generate_lease=None, key_bits=None, key_type=None, key_usages=None, localities=None, max_ttl=None, name=None, no_store=None, not_before_duration=None, organization_unit=None, organizations=None, policy_identifiers=None, postal_codes=None, provinces=None, require_cn=None, server_flag=None, street_addresses=None, ttl=None, use_csr_common_name=None, use_csr_sans=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:
- Allow
Any boolName Flag to allow any name
- Allow
Bare boolDomains Flag to allow certificates matching the actual domain
- Allow
Glob boolDomains Flag to allow names containing glob patterns.
- Allow
Ip boolSans Flag to allow IP SANs
- Allow
Localhost bool Flag to allow certificates for localhost
- Allow
Subdomains bool Flag to allow certificates matching subdomains
- Allowed
Domains List<string> List of allowed domains for certificates
- Allowed
Other List<string>Sans Defines allowed custom SANs
- Allowed
Uri List<string>Sans Defines allowed URI SANs
- Backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- Basic
Constraints boolValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- Client
Flag bool Flag to specify certificates for client use
- Code
Signing boolFlag Flag to specify certificates for code signing use
- Countries List<string>
The country of generated certificates
- Email
Protection boolFlag Flag to specify certificates for email protection use
- Enforce
Hostnames bool Flag to allow only valid host names
- Ext
Key List<string>Usages Specify the allowed extended key usage constraint on issued certificates
- Generate
Lease bool Flag to generate leases with certificates
- Key
Bits int The number of bits of generated keys
- Key
Type string The type of generated keys
- Key
Usages List<string> Specify the allowed key usage constraint on issued certificates
- Localities List<string>
The locality of generated certificates
- Max
Ttl string The maximum TTL
- Name string
The name to identify this role within the backend. Must be unique within the backend.
- No
Store bool Flag to not store certificates in the storage backend
- Not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- Organization
Unit List<string> The organization unit of generated certificates
- Organizations List<string>
The organization of generated certificates
- Policy
Identifiers List<string> Specify the list of allowed policies IODs
- Postal
Codes List<string> The postal code of generated certificates
- Provinces List<string>
The province of generated certificates
- Require
Cn bool Flag to force CN usage
- Server
Flag bool Flag to specify certificates for server use
- Street
Addresses List<string> The street address of generated certificates
- Ttl string
The TTL
- Use
Csr boolCommon Name Flag to use the CN in the CSR
- Use
Csr boolSans Flag to use the SANs in the CSR
- Allow
Any boolName Flag to allow any name
- Allow
Bare boolDomains Flag to allow certificates matching the actual domain
- Allow
Glob boolDomains Flag to allow names containing glob patterns.
- Allow
Ip boolSans Flag to allow IP SANs
- Allow
Localhost bool Flag to allow certificates for localhost
- Allow
Subdomains bool Flag to allow certificates matching subdomains
- Allowed
Domains []string List of allowed domains for certificates
- Allowed
Other []stringSans Defines allowed custom SANs
- Allowed
Uri []stringSans Defines allowed URI SANs
- Backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- Basic
Constraints boolValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- Client
Flag bool Flag to specify certificates for client use
- Code
Signing boolFlag Flag to specify certificates for code signing use
- Countries []string
The country of generated certificates
- Email
Protection boolFlag Flag to specify certificates for email protection use
- Enforce
Hostnames bool Flag to allow only valid host names
- Ext
Key []stringUsages Specify the allowed extended key usage constraint on issued certificates
- Generate
Lease bool Flag to generate leases with certificates
- Key
Bits int The number of bits of generated keys
- Key
Type string The type of generated keys
- Key
Usages []string Specify the allowed key usage constraint on issued certificates
- Localities []string
The locality of generated certificates
- Max
Ttl string The maximum TTL
- Name string
The name to identify this role within the backend. Must be unique within the backend.
- No
Store bool Flag to not store certificates in the storage backend
- Not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- Organization
Unit []string The organization unit of generated certificates
- Organizations []string
The organization of generated certificates
- Policy
Identifiers []string Specify the list of allowed policies IODs
- Postal
Codes []string The postal code of generated certificates
- Provinces []string
The province of generated certificates
- Require
Cn bool Flag to force CN usage
- Server
Flag bool Flag to specify certificates for server use
- Street
Addresses []string The street address of generated certificates
- Ttl string
The TTL
- Use
Csr boolCommon Name Flag to use the CN in the CSR
- Use
Csr boolSans Flag to use the SANs in the CSR
- allow
Any booleanName Flag to allow any name
- allow
Bare booleanDomains Flag to allow certificates matching the actual domain
- allow
Glob booleanDomains Flag to allow names containing glob patterns.
- allow
Ip booleanSans Flag to allow IP SANs
- allow
Localhost boolean Flag to allow certificates for localhost
- allow
Subdomains boolean Flag to allow certificates matching subdomains
- allowed
Domains string[] List of allowed domains for certificates
- allowed
Other string[]Sans Defines allowed custom SANs
- allowed
Uri string[]Sans Defines allowed URI SANs
- backend string
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- basic
Constraints booleanValid For Non Ca Flag to mark basic constraints valid when issuing non-CA certificates
- client
Flag boolean Flag to specify certificates for client use
- code
Signing booleanFlag Flag to specify certificates for code signing use
- countries string[]
The country of generated certificates
- email
Protection booleanFlag Flag to specify certificates for email protection use
- enforce
Hostnames boolean Flag to allow only valid host names
- ext
Key string[]Usages Specify the allowed extended key usage constraint on issued certificates
- generate
Lease boolean Flag to generate leases with certificates
- key
Bits number The number of bits of generated keys
- key
Type string The type of generated keys
- key
Usages string[] Specify the allowed key usage constraint on issued certificates
- localities string[]
The locality of generated certificates
- max
Ttl string The maximum TTL
- name string
The name to identify this role within the backend. Must be unique within the backend.
- no
Store boolean Flag to not store certificates in the storage backend
- not
Before stringDuration Specifies the duration by which to backdate the NotBefore property.
- organization
Unit string[] The organization unit of generated certificates
- organizations string[]
The organization of generated certificates
- policy
Identifiers string[] Specify the list of allowed policies IODs
- postal
Codes string[] The postal code of generated certificates
- provinces string[]
The province of generated certificates
- require
Cn boolean Flag to force CN usage
- server
Flag boolean Flag to specify certificates for server use
- street
Addresses string[] The street address of generated certificates
- ttl string
The TTL
- use
Csr booleanCommon Name Flag to use the CN in the CSR
- use
Csr booleanSans Flag to use the SANs in the CSR
- allow_
any_ boolname Flag to allow any name
- allow_
bare_ booldomains Flag to allow certificates matching the actual domain
- allow_
glob_ booldomains Flag to allow names containing glob patterns.
- allow_
ip_ boolsans Flag to allow IP SANs
- allow_
localhost bool Flag to allow certificates for localhost
- allow_
subdomains bool Flag to allow certificates matching subdomains
- allowed_
domains List[str] List of allowed domains for certificates
- allowed_
other_ List[str]sans Defines allowed custom SANs
- allowed_
uri_ List[str]sans Defines allowed URI SANs
- backend str
The path the PKI secret backend is mounted at, with no leading or trailing
/s.- basic_
constraints_ boolvalid_ for_ non_ ca Flag to mark basic constraints valid when issuing non-CA certificates
- client_
flag bool Flag to specify certificates for client use
- code_
signing_ boolflag Flag to specify certificates for code signing use
- countries List[str]
The country of generated certificates
- email_
protection_ boolflag Flag to specify certificates for email protection use
- enforce_
hostnames bool Flag to allow only valid host names
- ext_
key_ List[str]usages Specify the allowed extended key usage constraint on issued certificates
- generate_
lease bool Flag to generate leases with certificates
- key_
bits float The number of bits of generated keys
- key_
type str The type of generated keys
- key_
usages List[str] Specify the allowed key usage constraint on issued certificates
- localities List[str]
The locality of generated certificates
- max_
ttl str The maximum TTL
- name str
The name to identify this role within the backend. Must be unique within the backend.
- no_
store bool Flag to not store certificates in the storage backend
- not_
before_ strduration Specifies the duration by which to backdate the NotBefore property.
- organization_
unit List[str] The organization unit of generated certificates
- organizations List[str]
The organization of generated certificates
- policy_
identifiers List[str] Specify the list of allowed policies IODs
- postal_
codes List[str] The postal code of generated certificates
- provinces List[str]
The province of generated certificates
- require_
cn bool Flag to force CN usage
- server_
flag bool Flag to specify certificates for server use
- street_
addresses List[str] The street address of generated certificates
- ttl str
The TTL
- use_
csr_ boolcommon_ name Flag to use the CN in the CSR
- use_
csr_ boolsans Flag to use the SANs in the CSR
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vaultTerraform Provider.