Show / Hide Table of Contents

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",
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AclRole
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AclRole : CustomResource

Constructors

View Source

AclRole(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 Source

Description

A free form human readable description of the role.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the ACL role.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Namespace

The namespace to create the role within.

Declaration
public Output<string> Namespace { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.