Namespace
NOTE: This feature requires Consul Enterprise.
The consul..Namespace resource provides isolated Consul Enterprise Namespaces.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var production = new Consul.Namespace("production", new Consul.NamespaceArgs
{
Description = "Production namespace",
Meta =
{
{ "foo", "bar" },
},
});
}
}
Coming soon!
import pulumi
import pulumi_consul as consul
production = consul.Namespace("production",
description="Production namespace",
meta={
"foo": "bar",
})import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const production = new consul.Namespace("production", {
description: "Production namespace",
meta: {
foo: "bar",
},
});Create a Namespace Resource
new Namespace(name: string, args?: NamespaceArgs, opts?: CustomResourceOptions);def Namespace(resource_name, opts=None, description=None, meta=None, name=None, policy_defaults=None, role_defaults=None, __props__=None);func NewNamespace(ctx *Context, name string, args *NamespaceArgs, opts ...ResourceOption) (*Namespace, error)public Namespace(string name, NamespaceArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NamespaceArgs
- 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 NamespaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NamespaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Namespace Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Namespace resource accepts the following input properties:
- Description string
Free form namespace description.
- Meta Dictionary<string, string>
Specifies arbitrary KV metadata to associate with the namespace.
- Name string
The namespace name.
- Policy
Defaults List<string> The list of default policies that should be applied to all tokens created in this namespace.
- Role
Defaults List<string> The list of default roles that should be applied to all tokens created in this namespace.
- Description string
Free form namespace description.
- Meta map[string]string
Specifies arbitrary KV metadata to associate with the namespace.
- Name string
The namespace name.
- Policy
Defaults []string The list of default policies that should be applied to all tokens created in this namespace.
- Role
Defaults []string The list of default roles that should be applied to all tokens created in this namespace.
- description string
Free form namespace description.
- meta {[key: string]: string}
Specifies arbitrary KV metadata to associate with the namespace.
- name string
The namespace name.
- policy
Defaults string[] The list of default policies that should be applied to all tokens created in this namespace.
- role
Defaults string[] The list of default roles that should be applied to all tokens created in this namespace.
- description str
Free form namespace description.
- meta Dict[str, str]
Specifies arbitrary KV metadata to associate with the namespace.
- name str
The namespace name.
- policy_
defaults List[str] The list of default policies that should be applied to all tokens created in this namespace.
- role_
defaults List[str] The list of default roles that should be applied to all tokens created in this namespace.
Outputs
All input properties are implicitly available as output properties. Additionally, the Namespace resource produces the following output properties:
Look up an Existing Namespace Resource
Get an existing Namespace 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?: NamespaceState, opts?: CustomResourceOptions): Namespacestatic get(resource_name, id, opts=None, description=None, meta=None, name=None, policy_defaults=None, role_defaults=None, __props__=None);func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)public static Namespace Get(string name, Input<string> id, NamespaceState? 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:
- Description string
Free form namespace description.
- Meta Dictionary<string, string>
Specifies arbitrary KV metadata to associate with the namespace.
- Name string
The namespace name.
- Policy
Defaults List<string> The list of default policies that should be applied to all tokens created in this namespace.
- Role
Defaults List<string> The list of default roles that should be applied to all tokens created in this namespace.
- Description string
Free form namespace description.
- Meta map[string]string
Specifies arbitrary KV metadata to associate with the namespace.
- Name string
The namespace name.
- Policy
Defaults []string The list of default policies that should be applied to all tokens created in this namespace.
- Role
Defaults []string The list of default roles that should be applied to all tokens created in this namespace.
- description string
Free form namespace description.
- meta {[key: string]: string}
Specifies arbitrary KV metadata to associate with the namespace.
- name string
The namespace name.
- policy
Defaults string[] The list of default policies that should be applied to all tokens created in this namespace.
- role
Defaults string[] The list of default roles that should be applied to all tokens created in this namespace.
- description str
Free form namespace description.
- meta Dict[str, str]
Specifies arbitrary KV metadata to associate with the namespace.
- name str
The namespace name.
- policy_
defaults List[str] The list of default policies that should be applied to all tokens created in this namespace.
- role_
defaults List[str] The list of default roles that should be applied to all tokens created in this namespace.
Package Details
- Repository
- https://github.com/pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consulTerraform Provider.