Class AclRole
Starting with Consul 1.5.0, the consul..AclRole can be used to managed Consul ACL roles.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var read_policy = new Consul.AclPolicy("read-policy", new Consul.AclPolicyArgs
{
Datacenters =
{
"dc1",
},
Rules = "node \"\" { policy = \"read\" }",
});
var read = new Consul.AclRole("read", new Consul.AclRoleArgs
{
Description = "bar",
Policies =
{
read_policy.Id,
},
ServiceIdentities =
{
new Consul.Inputs.AclRoleServiceIdentityArgs
{
ServiceName = "foo",
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AclRole : CustomResource
Constructors
View SourceAclRole(String, AclRoleArgs, CustomResourceOptions)
Create a AclRole resource with the given unique name, arguments, and options.
Declaration
public AclRole(string name, AclRoleArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AclRoleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDescription
A free form human readable description of the role.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the ACL role.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Namespace
The namespace to create the role within.
Declaration
public Output<string> Namespace { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policies
The list of policies that should be applied to the role.
Declaration
public Output<ImmutableArray<string>> Policies { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ServiceIdentities
The list of service identities that should be applied to the role.
Declaration
public Output<ImmutableArray<AclRoleServiceIdentity>> ServiceIdentities { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<AclRoleServiceIdentity>> |
Methods
View SourceGet(String, Input<String>, AclRoleState, CustomResourceOptions)
Get an existing AclRole resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AclRole Get(string name, Input<string> id, AclRoleState 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. |
| AclRoleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AclRole |