UNPKG

@pulumi/consul

Version:

A Pulumi package for creating and managing consul resources.

144 lines (143 loc) 4.79 kB
import * as pulumi from "@pulumi/pulumi"; /** * > **NOTE:** This feature requires Consul Enterprise. * * The `consul.Namespace` resource provides isolated [Consul Enterprise Namespaces](https://www.consul.io/docs/enterprise/namespaces/index.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as consul from "@pulumi/consul"; * * const production = new consul.Namespace("production", { * name: "production", * description: "Production namespace", * meta: { * foo: "bar", * }, * }); * ``` * * ## Import * * `consul_namespace` can be imported. This is useful to manage attributes of the * default namespace that is created automatically: * * ```sh * $ pulumi import consul:index/namespace:Namespace default default * ``` */ export declare class Namespace extends pulumi.CustomResource { /** * Get an existing Namespace resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NamespaceState, opts?: pulumi.CustomResourceOptions): Namespace; /** * Returns true if the given object is an instance of Namespace. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Namespace; /** * Free form namespace description. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies arbitrary KV metadata to associate with the namespace. */ readonly meta: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The namespace name. */ readonly name: pulumi.Output<string>; /** * The partition to create the namespace within. */ readonly partition: pulumi.Output<string | undefined>; /** * The list of default policies that should be applied to all tokens created in this namespace. */ readonly policyDefaults: pulumi.Output<string[] | undefined>; /** * The list of default roles that should be applied to all tokens created in this namespace. */ readonly roleDefaults: pulumi.Output<string[] | undefined>; /** * Create a Namespace resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: NamespaceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Namespace resources. */ export interface NamespaceState { /** * Free form namespace description. */ description?: pulumi.Input<string>; /** * Specifies arbitrary KV metadata to associate with the namespace. */ meta?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The namespace name. */ name?: pulumi.Input<string>; /** * The partition to create the namespace within. */ partition?: pulumi.Input<string>; /** * The list of default policies that should be applied to all tokens created in this namespace. */ policyDefaults?: pulumi.Input<pulumi.Input<string>[]>; /** * The list of default roles that should be applied to all tokens created in this namespace. */ roleDefaults?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a Namespace resource. */ export interface NamespaceArgs { /** * Free form namespace description. */ description?: pulumi.Input<string>; /** * Specifies arbitrary KV metadata to associate with the namespace. */ meta?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The namespace name. */ name?: pulumi.Input<string>; /** * The partition to create the namespace within. */ partition?: pulumi.Input<string>; /** * The list of default policies that should be applied to all tokens created in this namespace. */ policyDefaults?: pulumi.Input<pulumi.Input<string>[]>; /** * The list of default roles that should be applied to all tokens created in this namespace. */ roleDefaults?: pulumi.Input<pulumi.Input<string>[]>; }