GetAclPolicy
The consul..AclPolicy data source returns the information related to a
Consul ACL Policy.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var agent = Output.Create(Consul.GetAclPolicy.InvokeAsync(new Consul.GetAclPolicyArgs
{
Name = "agent",
}));
this.ConsulAclPolicy = agent.Apply(agent => agent.Rules);
}
[Output("consulAclPolicy")]
public Output<string> ConsulAclPolicy { get; set; }
}
Coming soon!
import pulumi
import pulumi_consul as consul
agent = consul.get_acl_policy(name="agent")
pulumi.export("consulAclPolicy", agent.rules)import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const agent = consul.getAclPolicy({
name: "agent",
});
export const consulAclPolicy = agent.then(agent => agent.rules);Using GetAclPolicy
function getAclPolicy(args: GetAclPolicyArgs, opts?: InvokeOptions): Promise<GetAclPolicyResult>function get_acl_policy(datacenters=None, description=None, name=None, namespace=None, rules=None, opts=None)func LookupAclPolicy(ctx *Context, args *LookupAclPolicyArgs, opts ...InvokeOption) (*LookupAclPolicyResult, error)Note: This function is named
LookupAclPolicyin the Go SDK.
public static class GetAclPolicy {
public static Task<GetAclPolicyResult> InvokeAsync(GetAclPolicyArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the ACL Policy.
- Datacenters List<string>
The datacenters associated with the ACL Policy.
- Description string
The description of the ACL Policy.
- Namespace string
The namespace to lookup the policy.
- Rules string
The rules associated with the ACL Policy.
- Name string
The name of the ACL Policy.
- Datacenters []string
The datacenters associated with the ACL Policy.
- Description string
The description of the ACL Policy.
- Namespace string
The namespace to lookup the policy.
- Rules string
The rules associated with the ACL Policy.
- name string
The name of the ACL Policy.
- datacenters string[]
The datacenters associated with the ACL Policy.
- description string
The description of the ACL Policy.
- namespace string
The namespace to lookup the policy.
- rules string
The rules associated with the ACL Policy.
- name str
The name of the ACL Policy.
- datacenters List[str]
The datacenters associated with the ACL Policy.
- description str
The description of the ACL Policy.
- namespace str
The namespace to lookup the policy.
- rules str
The rules associated with the ACL Policy.
GetAclPolicy Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Datacenters List<string>
The datacenters associated with the ACL Policy.
- Description string
The description of the ACL Policy.
- Namespace string
- Rules string
The rules associated with the ACL Policy.
Package Details
- Repository
- https://github.com/pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consulTerraform Provider.