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; }
}
package main
import (
"github.com/pulumi/pulumi-consul/sdk/v2/go/consul"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
agent, err := consul.LookupAclPolicy(ctx, &consul.LookupAclPolicyArgs{
Name: "agent",
}, nil)
if err != nil {
return err
}
ctx.Export("consulAclPolicy", agent.Rules)
return nil
})
}
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>
def get_acl_policy(datacenters: Optional[Sequence[str]] = None, description: Optional[str] = None, name: Optional[str] = None, namespace: Optional[str] = None, rules: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetAclPolicyResult
func LookupAclPolicy(ctx *Context, args *LookupAclPolicyArgs, opts ...InvokeOption) (*LookupAclPolicyResult, error)
Note: This function is named
LookupAclPolicy
in 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 Sequence[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.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Datacenters []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.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- datacenters 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.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- datacenters Sequence[str]
The datacenters associated with the ACL Policy.
- description str
The description of the ACL Policy.
- namespace str
- rules str
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
consul
Terraform Provider.