1. Registry
  2. Packages
  3. Lxd Provider
  4. API Docs
  5. getNetworkAcl
Viewing docs for lxd 3.1.0
published on Tuesday, Sep 15, 2026 by terraform-lxd
Viewing docs for lxd 3.1.0
published on Tuesday, Sep 15, 2026 by terraform-lxd

    # lxd.NetworkAcl

    Provides information about an existing LXD network ACL.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as lxd from "@pulumi/lxd";
    
    const acl = lxd.getNetworkAcl({
        name: "my-acl",
    });
    
    import pulumi
    import pulumi_lxd as lxd
    
    acl = lxd.get_network_acl(name="my-acl")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lxd/v3/lxd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lxd.LookupNetworkAcl(ctx, &lxd.LookupNetworkAclArgs{
    			Name: "my-acl",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lxd = Pulumi.Lxd;
    
    return await Deployment.RunAsync(() => 
    {
        var acl = Lxd.GetNetworkAcl.Invoke(new()
        {
            Name = "my-acl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lxd.LxdFunctions;
    import com.pulumi.lxd.inputs.GetNetworkAclArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var acl = LxdFunctions.getNetworkAcl(GetNetworkAclArgs.builder()
                .name("my-acl")
                .build());
    
        }
    }
    
    variables:
      acl:
        fn::invoke:
          function: lxd:getNetworkAcl
          arguments:
            name: my-acl
    
    Example coming soon!
    

    Using getNetworkAcl

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNetworkAcl(args: GetNetworkAclArgs, opts?: InvokeOptions): Promise<GetNetworkAclResult>
    function getNetworkAclOutput(args: GetNetworkAclOutputArgs, opts?: InvokeOutputOptions): Output<GetNetworkAclResult>
    def get_network_acl(name: Optional[str] = None,
                        project: Optional[str] = None,
                        remote: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNetworkAclResult
    def get_network_acl_output(name: pulumi.Input[Optional[str]] = None,
                        project: pulumi.Input[Optional[str]] = None,
                        remote: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOutputOptions] = None) -> Output[GetNetworkAclResult]
    func LookupNetworkAcl(ctx *Context, args *LookupNetworkAclArgs, opts ...InvokeOption) (*LookupNetworkAclResult, error)
    func LookupNetworkAclOutput(ctx *Context, args *LookupNetworkAclOutputArgs, opts ...InvokeOption) LookupNetworkAclResultOutput

    > Note: This function is named LookupNetworkAcl in the Go SDK.

    public static class GetNetworkAcl 
    {
        public static Task<GetNetworkAclResult> InvokeAsync(GetNetworkAclArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkAclResult> Invoke(GetNetworkAclInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkAclResult> Invoke(GetNetworkAclInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetNetworkAclResult> getNetworkAcl(GetNetworkAclArgs args, InvokeOptions options)
    public static Output<GetNetworkAclResult> getNetworkAcl(GetNetworkAclArgs args, InvokeOptions options)
    public static Output<GetNetworkAclResult> getNetworkAcl(GetNetworkAclArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: lxd:index/getNetworkAcl:getNetworkAcl
      arguments:
        # arguments dictionary
    data "lxd_get_network_acl" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Required - Name of the network ACL.
    Project string
    Optional - Name of the project where the ACL is located.
    Remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    Name string
    Required - Name of the network ACL.
    Project string
    Optional - Name of the project where the ACL is located.
    Remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name string
    Required - Name of the network ACL.
    project string
    Optional - Name of the project where the ACL is located.
    remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name String
    Required - Name of the network ACL.
    project String
    Optional - Name of the project where the ACL is located.
    remote String
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name string
    Required - Name of the network ACL.
    project string
    Optional - Name of the project where the ACL is located.
    remote string
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name str
    Required - Name of the network ACL.
    project str
    Optional - Name of the project where the ACL is located.
    remote str
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.
    name String
    Required - Name of the network ACL.
    project String
    Optional - Name of the project where the ACL is located.
    remote String
    Optional - The remote in which the resource was created. If not provided, the provider's default remote is used.

    getNetworkAcl Result

    The following output properties are available:

    Config Dictionary<string, string>
    Map of key/value pairs of network ACL config settings.
    Description string
    Rule description.
    Egresses List<GetNetworkAclEgress>
    Set of egress rules. Each rule exports:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ingresses List<GetNetworkAclIngress>
    Set of ingress rules. Same attributes as egress.
    Name string
    Project string
    Remote string
    Config map[string]string
    Map of key/value pairs of network ACL config settings.
    Description string
    Rule description.
    Egresses []GetNetworkAclEgress
    Set of egress rules. Each rule exports:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ingresses []GetNetworkAclIngress
    Set of ingress rules. Same attributes as egress.
    Name string
    Project string
    Remote string
    config map(string)
    Map of key/value pairs of network ACL config settings.
    description string
    Rule description.
    egresses list(object)
    Set of egress rules. Each rule exports:
    id string
    The provider-assigned unique ID for this managed resource.
    ingresses list(object)
    Set of ingress rules. Same attributes as egress.
    name string
    project string
    remote string
    config Map<String,String>
    Map of key/value pairs of network ACL config settings.
    description String
    Rule description.
    egresses List<GetNetworkAclEgress>
    Set of egress rules. Each rule exports:
    id String
    The provider-assigned unique ID for this managed resource.
    ingresses List<GetNetworkAclIngress>
    Set of ingress rules. Same attributes as egress.
    name String
    project String
    remote String
    config {[key: string]: string}
    Map of key/value pairs of network ACL config settings.
    description string
    Rule description.
    egresses GetNetworkAclEgress[]
    Set of egress rules. Each rule exports:
    id string
    The provider-assigned unique ID for this managed resource.
    ingresses GetNetworkAclIngress[]
    Set of ingress rules. Same attributes as egress.
    name string
    project string
    remote string
    config Mapping[str, str]
    Map of key/value pairs of network ACL config settings.
    description str
    Rule description.
    egresses Sequence[GetNetworkAclEgress]
    Set of egress rules. Each rule exports:
    id str
    The provider-assigned unique ID for this managed resource.
    ingresses Sequence[GetNetworkAclIngress]
    Set of ingress rules. Same attributes as egress.
    name str
    project str
    remote str
    config Map<String>
    Map of key/value pairs of network ACL config settings.
    description String
    Rule description.
    egresses List<Property Map>
    Set of egress rules. Each rule exports:
    id String
    The provider-assigned unique ID for this managed resource.
    ingresses List<Property Map>
    Set of ingress rules. Same attributes as egress.
    name String
    project String
    remote String

    Supporting Types

    GetNetworkAclEgress

    Action string
    Rule action (allow, drop, reject).
    Description string
    Rule description.
    Destination string
    Destination address/CIDR.
    DestinationPort string
    Destination port(s).
    IcmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    IcmpType string
    ICMP type (only relevant for icmp4/icmp6).
    Protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    Source string
    Source address/CIDR.
    State string
    Rule state (enabled, disabled, logged).
    Action string
    Rule action (allow, drop, reject).
    Description string
    Rule description.
    Destination string
    Destination address/CIDR.
    DestinationPort string
    Destination port(s).
    IcmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    IcmpType string
    ICMP type (only relevant for icmp4/icmp6).
    Protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    Source string
    Source address/CIDR.
    State string
    Rule state (enabled, disabled, logged).
    action string
    Rule action (allow, drop, reject).
    description string
    Rule description.
    destination string
    Destination address/CIDR.
    destination_port string
    Destination port(s).
    icmp_code string
    ICMP code (only relevant for icmp4/icmp6).
    icmp_type string
    ICMP type (only relevant for icmp4/icmp6).
    protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    source string
    Source address/CIDR.
    state string
    Rule state (enabled, disabled, logged).
    action String
    Rule action (allow, drop, reject).
    description String
    Rule description.
    destination String
    Destination address/CIDR.
    destinationPort String
    Destination port(s).
    icmpCode String
    ICMP code (only relevant for icmp4/icmp6).
    icmpType String
    ICMP type (only relevant for icmp4/icmp6).
    protocol String
    Protocol (tcp, udp, icmp4, icmp6).
    source String
    Source address/CIDR.
    state String
    Rule state (enabled, disabled, logged).
    action string
    Rule action (allow, drop, reject).
    description string
    Rule description.
    destination string
    Destination address/CIDR.
    destinationPort string
    Destination port(s).
    icmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    icmpType string
    ICMP type (only relevant for icmp4/icmp6).
    protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    source string
    Source address/CIDR.
    state string
    Rule state (enabled, disabled, logged).
    action str
    Rule action (allow, drop, reject).
    description str
    Rule description.
    destination str
    Destination address/CIDR.
    destination_port str
    Destination port(s).
    icmp_code str
    ICMP code (only relevant for icmp4/icmp6).
    icmp_type str
    ICMP type (only relevant for icmp4/icmp6).
    protocol str
    Protocol (tcp, udp, icmp4, icmp6).
    source str
    Source address/CIDR.
    state str
    Rule state (enabled, disabled, logged).
    action String
    Rule action (allow, drop, reject).
    description String
    Rule description.
    destination String
    Destination address/CIDR.
    destinationPort String
    Destination port(s).
    icmpCode String
    ICMP code (only relevant for icmp4/icmp6).
    icmpType String
    ICMP type (only relevant for icmp4/icmp6).
    protocol String
    Protocol (tcp, udp, icmp4, icmp6).
    source String
    Source address/CIDR.
    state String
    Rule state (enabled, disabled, logged).

    GetNetworkAclIngress

    Action string
    Rule action (allow, drop, reject).
    Description string
    Rule description.
    Destination string
    Destination address/CIDR.
    DestinationPort string
    Destination port(s).
    IcmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    IcmpType string
    ICMP type (only relevant for icmp4/icmp6).
    Protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    Source string
    Source address/CIDR.
    State string
    Rule state (enabled, disabled, logged).
    Action string
    Rule action (allow, drop, reject).
    Description string
    Rule description.
    Destination string
    Destination address/CIDR.
    DestinationPort string
    Destination port(s).
    IcmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    IcmpType string
    ICMP type (only relevant for icmp4/icmp6).
    Protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    Source string
    Source address/CIDR.
    State string
    Rule state (enabled, disabled, logged).
    action string
    Rule action (allow, drop, reject).
    description string
    Rule description.
    destination string
    Destination address/CIDR.
    destination_port string
    Destination port(s).
    icmp_code string
    ICMP code (only relevant for icmp4/icmp6).
    icmp_type string
    ICMP type (only relevant for icmp4/icmp6).
    protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    source string
    Source address/CIDR.
    state string
    Rule state (enabled, disabled, logged).
    action String
    Rule action (allow, drop, reject).
    description String
    Rule description.
    destination String
    Destination address/CIDR.
    destinationPort String
    Destination port(s).
    icmpCode String
    ICMP code (only relevant for icmp4/icmp6).
    icmpType String
    ICMP type (only relevant for icmp4/icmp6).
    protocol String
    Protocol (tcp, udp, icmp4, icmp6).
    source String
    Source address/CIDR.
    state String
    Rule state (enabled, disabled, logged).
    action string
    Rule action (allow, drop, reject).
    description string
    Rule description.
    destination string
    Destination address/CIDR.
    destinationPort string
    Destination port(s).
    icmpCode string
    ICMP code (only relevant for icmp4/icmp6).
    icmpType string
    ICMP type (only relevant for icmp4/icmp6).
    protocol string
    Protocol (tcp, udp, icmp4, icmp6).
    source string
    Source address/CIDR.
    state string
    Rule state (enabled, disabled, logged).
    action str
    Rule action (allow, drop, reject).
    description str
    Rule description.
    destination str
    Destination address/CIDR.
    destination_port str
    Destination port(s).
    icmp_code str
    ICMP code (only relevant for icmp4/icmp6).
    icmp_type str
    ICMP type (only relevant for icmp4/icmp6).
    protocol str
    Protocol (tcp, udp, icmp4, icmp6).
    source str
    Source address/CIDR.
    state str
    Rule state (enabled, disabled, logged).
    action String
    Rule action (allow, drop, reject).
    description String
    Rule description.
    destination String
    Destination address/CIDR.
    destinationPort String
    Destination port(s).
    icmpCode String
    ICMP code (only relevant for icmp4/icmp6).
    icmpType String
    ICMP type (only relevant for icmp4/icmp6).
    protocol String
    Protocol (tcp, udp, icmp4, icmp6).
    source String
    Source address/CIDR.
    state String
    Rule state (enabled, disabled, logged).

    Package Details

    Repository
    lxd terraform-lxd/terraform-provider-lxd
    License
    Notes
    This Pulumi package is based on the lxd Terraform Provider.
    Viewing docs for lxd 3.1.0
    published on Tuesday, Sep 15, 2026 by terraform-lxd

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial