Class AclPolicy
Starting with Consul 1.4.0, the consul..AclPolicy can be used to managed Consul ACL policies.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var test = new Consul.AclPolicy("test", new Consul.AclPolicyArgs
{
Datacenters =
{
"dc1",
},
Rules = @"node_prefix """" {
policy = ""read""
}
",
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AclPolicy : CustomResource
Constructors
View SourceAclPolicy(String, AclPolicyArgs, CustomResourceOptions)
Create a AclPolicy resource with the given unique name, arguments, and options.
Declaration
public AclPolicy(string name, AclPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AclPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDatacenters
The datacenters of the policy.
Declaration
public Output<ImmutableArray<string>> Datacenters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Description
The description of the policy.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the policy.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Namespace
The namespace to create the policy within.
Declaration
public Output<string> Namespace { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Rules
The rules of the policy.
Declaration
public Output<string> Rules { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AclPolicyState, CustomResourceOptions)
Get an existing AclPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AclPolicy Get(string name, Input<string> id, AclPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AclPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AclPolicy |