vault.QuotaLeaseCount
Explore with Pulumi AI
Manage lease count quotas which enforce the number of leases that can be created. A lease count quota can be created at the root level or defined on a namespace or mount by specifying a path when creating the quota.
See Vault’s Documentation for more information.
Note this feature is available only with Vault Enterprise.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const global = new vault.QuotaLeaseCount("global", {
name: "global",
path: "",
maxLeases: 100,
});
import pulumi
import pulumi_vault as vault
global_ = vault.QuotaLeaseCount("global",
name="global",
path="",
max_leases=100)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.NewQuotaLeaseCount(ctx, "global", &vault.QuotaLeaseCountArgs{
Name: pulumi.String("global"),
Path: pulumi.String(""),
MaxLeases: pulumi.Int(100),
})
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 @global = new Vault.QuotaLeaseCount("global", new()
{
Name = "global",
Path = "",
MaxLeases = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.QuotaLeaseCount;
import com.pulumi.vault.QuotaLeaseCountArgs;
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 global = new QuotaLeaseCount("global", QuotaLeaseCountArgs.builder()
.name("global")
.path("")
.maxLeases(100)
.build());
}
}
resources:
global:
type: vault:QuotaLeaseCount
properties:
name: global
path:
maxLeases: 100
Create QuotaLeaseCount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QuotaLeaseCount(name: string, args: QuotaLeaseCountArgs, opts?: CustomResourceOptions);
@overload
def QuotaLeaseCount(resource_name: str,
args: QuotaLeaseCountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def QuotaLeaseCount(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_leases: Optional[int] = None,
inheritable: Optional[bool] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
path: Optional[str] = None,
role: Optional[str] = None)
func NewQuotaLeaseCount(ctx *Context, name string, args QuotaLeaseCountArgs, opts ...ResourceOption) (*QuotaLeaseCount, error)
public QuotaLeaseCount(string name, QuotaLeaseCountArgs args, CustomResourceOptions? opts = null)
public QuotaLeaseCount(String name, QuotaLeaseCountArgs args)
public QuotaLeaseCount(String name, QuotaLeaseCountArgs args, CustomResourceOptions options)
type: vault:QuotaLeaseCount
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 QuotaLeaseCountArgs
- 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 QuotaLeaseCountArgs
- 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 QuotaLeaseCountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QuotaLeaseCountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QuotaLeaseCountArgs
- 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 quotaLeaseCountResource = new Vault.QuotaLeaseCount("quotaLeaseCountResource", new()
{
MaxLeases = 0,
Inheritable = false,
Name = "string",
Namespace = "string",
Path = "string",
Role = "string",
});
example, err := vault.NewQuotaLeaseCount(ctx, "quotaLeaseCountResource", &vault.QuotaLeaseCountArgs{
MaxLeases: pulumi.Int(0),
Inheritable: pulumi.Bool(false),
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
Path: pulumi.String("string"),
Role: pulumi.String("string"),
})
var quotaLeaseCountResource = new QuotaLeaseCount("quotaLeaseCountResource", QuotaLeaseCountArgs.builder()
.maxLeases(0)
.inheritable(false)
.name("string")
.namespace("string")
.path("string")
.role("string")
.build());
quota_lease_count_resource = vault.QuotaLeaseCount("quotaLeaseCountResource",
max_leases=0,
inheritable=False,
name="string",
namespace="string",
path="string",
role="string")
const quotaLeaseCountResource = new vault.QuotaLeaseCount("quotaLeaseCountResource", {
maxLeases: 0,
inheritable: false,
name: "string",
namespace: "string",
path: "string",
role: "string",
});
type: vault:QuotaLeaseCount
properties:
inheritable: false
maxLeases: 0
name: string
namespace: string
path: string
role: string
QuotaLeaseCount Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The QuotaLeaseCount resource accepts the following input properties:
- Max
Leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - Inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - Name string
- Name of the rate limit quota
- 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. - Path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - Role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- Max
Leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - Inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - Name string
- Name of the rate limit quota
- 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. - Path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - Role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- max
Leases Integer - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - inheritable Boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - name String
- Name of the rate limit quota
- 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. - path String
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role String
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- max
Leases number - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - inheritable boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - name string
- Name of the rate limit quota
- 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. - path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- max_
leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - name str
- Name of the rate limit quota
- 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. - path str
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role str
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- max
Leases Number - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - inheritable Boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - name String
- Name of the rate limit quota
- 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. - path String
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role String
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
Outputs
All input properties are implicitly available as output properties. Additionally, the QuotaLeaseCount 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 QuotaLeaseCount Resource
Get an existing QuotaLeaseCount 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?: QuotaLeaseCountState, opts?: CustomResourceOptions): QuotaLeaseCount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
inheritable: Optional[bool] = None,
max_leases: Optional[int] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
path: Optional[str] = None,
role: Optional[str] = None) -> QuotaLeaseCount
func GetQuotaLeaseCount(ctx *Context, name string, id IDInput, state *QuotaLeaseCountState, opts ...ResourceOption) (*QuotaLeaseCount, error)
public static QuotaLeaseCount Get(string name, Input<string> id, QuotaLeaseCountState? state, CustomResourceOptions? opts = null)
public static QuotaLeaseCount get(String name, Output<String> id, QuotaLeaseCountState 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.
- Inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - Max
Leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - Name string
- Name of the rate limit quota
- 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. - Path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - Role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- Inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - Max
Leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - Name string
- Name of the rate limit quota
- 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. - Path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - Role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- inheritable Boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - max
Leases Integer - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - name String
- Name of the rate limit quota
- 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. - path String
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role String
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- inheritable boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - max
Leases number - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - name string
- Name of the rate limit quota
- 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. - path string
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role string
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- inheritable bool
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - max_
leases int - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - name str
- Name of the rate limit quota
- 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. - path str
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role str
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
- inheritable Boolean
- If set to
true
on a quota where path is set to a namespace, the same quota will be cumulatively applied to all child namespace. The inheritable parameter cannot be set totrue
if the path does not specify a namespace. Only the quotas associated with the root namespace are inheritable by default. Requires Vault 1.15+. - max
Leases Number - The maximum number of leases to be allowed by the quota
rule. The
max_leases
must be positive. - name String
- Name of the rate limit quota
- 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. - path String
- Path of the mount or namespace to apply the quota. A blank path configures a
global rate limit quota. For example
namespace1/
adds a quota to a full namespace,namespace1/auth/userpass
adds aquota
touserpass
innamespace1
. Updating this field on an existing quota can have "moving" effects. For example, updatingauth/userpass
tonamespace1/auth/userpass
moves this quota from being a global mount quota to a namespace specific mount quota. Note, namespaces are supported in Enterprise only. - role String
- If set on a quota where
path
is set to an auth mount with a concept of roles (such as /auth/approle/), this will make the quota restrict login requests to that mount that are made with the specified role.
Import
Lease count quotas can be imported using their names
$ pulumi import vault:index/quotaLeaseCount:QuotaLeaseCount global global
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.