1. Packages
  2. Ibm Provider
  3. API Docs
  4. IsNetworkAcl
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.IsNetworkAcl

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete a network access control list (ACL). For more information, about network ACL, see setting up network ACLs.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const exampleIsVpc = new ibm.IsVpc("exampleIsVpc", {});
    const exampleIsNetworkAcl = new ibm.IsNetworkAcl("exampleIsNetworkAcl", {
        vpc: exampleIsVpc.isVpcId,
        rules: [
            {
                name: "outbound",
                action: "allow",
                source: "0.0.0.0/0",
                destination: "0.0.0.0/0",
                direction: "outbound",
                icmp: {
                    code: 1,
                    type: 1,
                },
            },
            {
                name: "inbound",
                action: "allow",
                source: "0.0.0.0/0",
                destination: "0.0.0.0/0",
                direction: "inbound",
                icmp: {
                    code: 1,
                    type: 1,
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example_is_vpc = ibm.IsVpc("exampleIsVpc")
    example_is_network_acl = ibm.IsNetworkAcl("exampleIsNetworkAcl",
        vpc=example_is_vpc.is_vpc_id,
        rules=[
            {
                "name": "outbound",
                "action": "allow",
                "source": "0.0.0.0/0",
                "destination": "0.0.0.0/0",
                "direction": "outbound",
                "icmp": {
                    "code": 1,
                    "type": 1,
                },
            },
            {
                "name": "inbound",
                "action": "allow",
                "source": "0.0.0.0/0",
                "destination": "0.0.0.0/0",
                "direction": "inbound",
                "icmp": {
                    "code": 1,
                    "type": 1,
                },
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleIsVpc, err := ibm.NewIsVpc(ctx, "exampleIsVpc", nil)
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIsNetworkAcl(ctx, "exampleIsNetworkAcl", &ibm.IsNetworkAclArgs{
    			Vpc: exampleIsVpc.IsVpcId,
    			Rules: ibm.IsNetworkAclRuleTypeArray{
    				&ibm.IsNetworkAclRuleTypeArgs{
    					Name:        pulumi.String("outbound"),
    					Action:      pulumi.String("allow"),
    					Source:      pulumi.String("0.0.0.0/0"),
    					Destination: pulumi.String("0.0.0.0/0"),
    					Direction:   pulumi.String("outbound"),
    					Icmp: &ibm.IsNetworkAclRuleIcmpArgs{
    						Code: pulumi.Float64(1),
    						Type: pulumi.Float64(1),
    					},
    				},
    				&ibm.IsNetworkAclRuleTypeArgs{
    					Name:        pulumi.String("inbound"),
    					Action:      pulumi.String("allow"),
    					Source:      pulumi.String("0.0.0.0/0"),
    					Destination: pulumi.String("0.0.0.0/0"),
    					Direction:   pulumi.String("inbound"),
    					Icmp: &ibm.IsNetworkAclRuleIcmpArgs{
    						Code: pulumi.Float64(1),
    						Type: pulumi.Float64(1),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleIsVpc = new Ibm.IsVpc("exampleIsVpc");
    
        var exampleIsNetworkAcl = new Ibm.IsNetworkAcl("exampleIsNetworkAcl", new()
        {
            Vpc = exampleIsVpc.IsVpcId,
            Rules = new[]
            {
                new Ibm.Inputs.IsNetworkAclRuleArgs
                {
                    Name = "outbound",
                    Action = "allow",
                    Source = "0.0.0.0/0",
                    Destination = "0.0.0.0/0",
                    Direction = "outbound",
                    Icmp = new Ibm.Inputs.IsNetworkAclRuleIcmpArgs
                    {
                        Code = 1,
                        Type = 1,
                    },
                },
                new Ibm.Inputs.IsNetworkAclRuleArgs
                {
                    Name = "inbound",
                    Action = "allow",
                    Source = "0.0.0.0/0",
                    Destination = "0.0.0.0/0",
                    Direction = "inbound",
                    Icmp = new Ibm.Inputs.IsNetworkAclRuleIcmpArgs
                    {
                        Code = 1,
                        Type = 1,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsVpc;
    import com.pulumi.ibm.IsNetworkAcl;
    import com.pulumi.ibm.IsNetworkAclArgs;
    import com.pulumi.ibm.inputs.IsNetworkAclRuleArgs;
    import com.pulumi.ibm.inputs.IsNetworkAclRuleIcmpArgs;
    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) {
            var exampleIsVpc = new IsVpc("exampleIsVpc");
    
            var exampleIsNetworkAcl = new IsNetworkAcl("exampleIsNetworkAcl", IsNetworkAclArgs.builder()
                .vpc(exampleIsVpc.isVpcId())
                .rules(            
                    IsNetworkAclRuleArgs.builder()
                        .name("outbound")
                        .action("allow")
                        .source("0.0.0.0/0")
                        .destination("0.0.0.0/0")
                        .direction("outbound")
                        .icmp(IsNetworkAclRuleIcmpArgs.builder()
                            .code(1)
                            .type(1)
                            .build())
                        .build(),
                    IsNetworkAclRuleArgs.builder()
                        .name("inbound")
                        .action("allow")
                        .source("0.0.0.0/0")
                        .destination("0.0.0.0/0")
                        .direction("inbound")
                        .icmp(IsNetworkAclRuleIcmpArgs.builder()
                            .code(1)
                            .type(1)
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      exampleIsVpc:
        type: ibm:IsVpc
      exampleIsNetworkAcl:
        type: ibm:IsNetworkAcl
        properties:
          vpc: ${exampleIsVpc.isVpcId}
          rules:
            - name: outbound
              action: allow
              source: 0.0.0.0/0
              destination: 0.0.0.0/0
              direction: outbound
              icmp:
                code: 1
                type: 1
            - name: inbound
              action: allow
              source: 0.0.0.0/0
              destination: 0.0.0.0/0
              direction: inbound
              icmp:
                code: 1
                type: 1
    

    Create IsNetworkAcl Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IsNetworkAcl(name: string, args?: IsNetworkAclArgs, opts?: CustomResourceOptions);
    @overload
    def IsNetworkAcl(resource_name: str,
                     args: Optional[IsNetworkAclArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def IsNetworkAcl(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     access_tags: Optional[Sequence[str]] = None,
                     is_network_acl_id: Optional[str] = None,
                     name: Optional[str] = None,
                     resource_group: Optional[str] = None,
                     rules: Optional[Sequence[IsNetworkAclRuleArgs]] = None,
                     tags: Optional[Sequence[str]] = None,
                     timeouts: Optional[IsNetworkAclTimeoutsArgs] = None,
                     vpc: Optional[str] = None)
    func NewIsNetworkAcl(ctx *Context, name string, args *IsNetworkAclArgs, opts ...ResourceOption) (*IsNetworkAcl, error)
    public IsNetworkAcl(string name, IsNetworkAclArgs? args = null, CustomResourceOptions? opts = null)
    public IsNetworkAcl(String name, IsNetworkAclArgs args)
    public IsNetworkAcl(String name, IsNetworkAclArgs args, CustomResourceOptions options)
    
    type: ibm:IsNetworkAcl
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IsNetworkAclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IsNetworkAclArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IsNetworkAclArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IsNetworkAclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IsNetworkAclArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var isNetworkAclResource = new Ibm.IsNetworkAcl("isNetworkAclResource", new()
    {
        AccessTags = new[]
        {
            "string",
        },
        IsNetworkAclId = "string",
        Name = "string",
        ResourceGroup = "string",
        Rules = new[]
        {
            new Ibm.Inputs.IsNetworkAclRuleArgs
            {
                Action = "string",
                Destination = "string",
                Direction = "string",
                Name = "string",
                Source = "string",
                Icmp = new Ibm.Inputs.IsNetworkAclRuleIcmpArgs
                {
                    Code = 0,
                    Type = 0,
                },
                Id = "string",
                IpVersion = "string",
                Subnets = 0,
                Tcp = new Ibm.Inputs.IsNetworkAclRuleTcpArgs
                {
                    PortMax = 0,
                    PortMin = 0,
                    SourcePortMax = 0,
                    SourcePortMin = 0,
                },
                Udp = new Ibm.Inputs.IsNetworkAclRuleUdpArgs
                {
                    PortMax = 0,
                    PortMin = 0,
                    SourcePortMax = 0,
                    SourcePortMin = 0,
                },
            },
        },
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Ibm.Inputs.IsNetworkAclTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        Vpc = "string",
    });
    
    example, err := ibm.NewIsNetworkAcl(ctx, "isNetworkAclResource", &ibm.IsNetworkAclArgs{
    	AccessTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IsNetworkAclId: pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	ResourceGroup:  pulumi.String("string"),
    	Rules: ibm.IsNetworkAclRuleTypeArray{
    		&ibm.IsNetworkAclRuleTypeArgs{
    			Action:      pulumi.String("string"),
    			Destination: pulumi.String("string"),
    			Direction:   pulumi.String("string"),
    			Name:        pulumi.String("string"),
    			Source:      pulumi.String("string"),
    			Icmp: &ibm.IsNetworkAclRuleIcmpArgs{
    				Code: pulumi.Float64(0),
    				Type: pulumi.Float64(0),
    			},
    			Id:        pulumi.String("string"),
    			IpVersion: pulumi.String("string"),
    			Subnets:   pulumi.Float64(0),
    			Tcp: &ibm.IsNetworkAclRuleTcpArgs{
    				PortMax:       pulumi.Float64(0),
    				PortMin:       pulumi.Float64(0),
    				SourcePortMax: pulumi.Float64(0),
    				SourcePortMin: pulumi.Float64(0),
    			},
    			Udp: &ibm.IsNetworkAclRuleUdpArgs{
    				PortMax:       pulumi.Float64(0),
    				PortMin:       pulumi.Float64(0),
    				SourcePortMax: pulumi.Float64(0),
    				SourcePortMin: pulumi.Float64(0),
    			},
    		},
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &ibm.IsNetworkAclTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	Vpc: pulumi.String("string"),
    })
    
    var isNetworkAclResource = new IsNetworkAcl("isNetworkAclResource", IsNetworkAclArgs.builder()
        .accessTags("string")
        .isNetworkAclId("string")
        .name("string")
        .resourceGroup("string")
        .rules(IsNetworkAclRuleArgs.builder()
            .action("string")
            .destination("string")
            .direction("string")
            .name("string")
            .source("string")
            .icmp(IsNetworkAclRuleIcmpArgs.builder()
                .code(0)
                .type(0)
                .build())
            .id("string")
            .ipVersion("string")
            .subnets(0)
            .tcp(IsNetworkAclRuleTcpArgs.builder()
                .portMax(0)
                .portMin(0)
                .sourcePortMax(0)
                .sourcePortMin(0)
                .build())
            .udp(IsNetworkAclRuleUdpArgs.builder()
                .portMax(0)
                .portMin(0)
                .sourcePortMax(0)
                .sourcePortMin(0)
                .build())
            .build())
        .tags("string")
        .timeouts(IsNetworkAclTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .vpc("string")
        .build());
    
    is_network_acl_resource = ibm.IsNetworkAcl("isNetworkAclResource",
        access_tags=["string"],
        is_network_acl_id="string",
        name="string",
        resource_group="string",
        rules=[{
            "action": "string",
            "destination": "string",
            "direction": "string",
            "name": "string",
            "source": "string",
            "icmp": {
                "code": 0,
                "type": 0,
            },
            "id": "string",
            "ip_version": "string",
            "subnets": 0,
            "tcp": {
                "port_max": 0,
                "port_min": 0,
                "source_port_max": 0,
                "source_port_min": 0,
            },
            "udp": {
                "port_max": 0,
                "port_min": 0,
                "source_port_max": 0,
                "source_port_min": 0,
            },
        }],
        tags=["string"],
        timeouts={
            "create": "string",
            "delete": "string",
        },
        vpc="string")
    
    const isNetworkAclResource = new ibm.IsNetworkAcl("isNetworkAclResource", {
        accessTags: ["string"],
        isNetworkAclId: "string",
        name: "string",
        resourceGroup: "string",
        rules: [{
            action: "string",
            destination: "string",
            direction: "string",
            name: "string",
            source: "string",
            icmp: {
                code: 0,
                type: 0,
            },
            id: "string",
            ipVersion: "string",
            subnets: 0,
            tcp: {
                portMax: 0,
                portMin: 0,
                sourcePortMax: 0,
                sourcePortMin: 0,
            },
            udp: {
                portMax: 0,
                portMin: 0,
                sourcePortMax: 0,
                sourcePortMin: 0,
            },
        }],
        tags: ["string"],
        timeouts: {
            create: "string",
            "delete": "string",
        },
        vpc: "string",
    });
    
    type: ibm:IsNetworkAcl
    properties:
        accessTags:
            - string
        isNetworkAclId: string
        name: string
        resourceGroup: string
        rules:
            - action: string
              destination: string
              direction: string
              icmp:
                code: 0
                type: 0
              id: string
              ipVersion: string
              name: string
              source: string
              subnets: 0
              tcp:
                portMax: 0
                portMin: 0
                sourcePortMax: 0
                sourcePortMin: 0
              udp:
                portMax: 0
                portMin: 0
                sourcePortMax: 0
                sourcePortMin: 0
        tags:
            - string
        timeouts:
            create: string
            delete: string
        vpc: string
    

    IsNetworkAcl Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IsNetworkAcl resource accepts the following input properties:

    AccessTags List<string>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    IsNetworkAclId string
    (String) The rule ID.
    Name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    ResourceGroup string
    The ID of the resource group where you want to create the network ACL.
    Rules List<IsNetworkAclRule>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    Tags List<string>
    Tags associated with the network ACL.
    Timeouts IsNetworkAclTimeouts
    Vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    AccessTags []string

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    IsNetworkAclId string
    (String) The rule ID.
    Name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    ResourceGroup string
    The ID of the resource group where you want to create the network ACL.
    Rules []IsNetworkAclRuleTypeArgs

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    Tags []string
    Tags associated with the network ACL.
    Timeouts IsNetworkAclTimeoutsArgs
    Vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags List<String>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    isNetworkAclId String
    (String) The rule ID.
    name String
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceGroup String
    The ID of the resource group where you want to create the network ACL.
    rules List<IsNetworkAclRule>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags List<String>
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeouts
    vpc String
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags string[]

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    isNetworkAclId string
    (String) The rule ID.
    name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceGroup string
    The ID of the resource group where you want to create the network ACL.
    rules IsNetworkAclRule[]

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags string[]
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeouts
    vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    access_tags Sequence[str]

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    is_network_acl_id str
    (String) The rule ID.
    name str
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resource_group str
    The ID of the resource group where you want to create the network ACL.
    rules Sequence[IsNetworkAclRuleArgs]

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags Sequence[str]
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeoutsArgs
    vpc str
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags List<String>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    isNetworkAclId String
    (String) The rule ID.
    name String
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceGroup String
    The ID of the resource group where you want to create the network ACL.
    rules List<Property Map>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags List<String>
    Tags associated with the network ACL.
    timeouts Property Map
    vpc String
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IsNetworkAcl resource produces the following output properties:

    Crn string
    (String) The CRN of the network ACL.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    ResourceCrn string
    The crn of the resource
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    Crn string
    (String) The CRN of the network ACL.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    ResourceCrn string
    The crn of the resource
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    crn String
    (String) The CRN of the network ACL.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn String
    The crn of the resource
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    crn string
    (String) The CRN of the network ACL.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn string
    The crn of the resource
    resourceGroupName string
    The resource group name in which resource is provisioned
    resourceName string
    The name of the resource
    crn str
    (String) The CRN of the network ACL.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_controller_url str
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resource_crn str
    The crn of the resource
    resource_group_name str
    The resource group name in which resource is provisioned
    resource_name str
    The name of the resource
    crn String
    (String) The CRN of the network ACL.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn String
    The crn of the resource
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource

    Look up Existing IsNetworkAcl Resource

    Get an existing IsNetworkAcl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IsNetworkAclState, opts?: CustomResourceOptions): IsNetworkAcl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_tags: Optional[Sequence[str]] = None,
            crn: Optional[str] = None,
            is_network_acl_id: Optional[str] = None,
            name: Optional[str] = None,
            resource_controller_url: Optional[str] = None,
            resource_crn: Optional[str] = None,
            resource_group: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            resource_name: Optional[str] = None,
            rules: Optional[Sequence[IsNetworkAclRuleArgs]] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[IsNetworkAclTimeoutsArgs] = None,
            vpc: Optional[str] = None) -> IsNetworkAcl
    func GetIsNetworkAcl(ctx *Context, name string, id IDInput, state *IsNetworkAclState, opts ...ResourceOption) (*IsNetworkAcl, error)
    public static IsNetworkAcl Get(string name, Input<string> id, IsNetworkAclState? state, CustomResourceOptions? opts = null)
    public static IsNetworkAcl get(String name, Output<String> id, IsNetworkAclState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IsNetworkAcl    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccessTags List<string>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    Crn string
    (String) The CRN of the network ACL.
    IsNetworkAclId string
    (String) The rule ID.
    Name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    ResourceCrn string
    The crn of the resource
    ResourceGroup string
    The ID of the resource group where you want to create the network ACL.
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    Rules List<IsNetworkAclRule>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    Tags List<string>
    Tags associated with the network ACL.
    Timeouts IsNetworkAclTimeouts
    Vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    AccessTags []string

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    Crn string
    (String) The CRN of the network ACL.
    IsNetworkAclId string
    (String) The rule ID.
    Name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    ResourceCrn string
    The crn of the resource
    ResourceGroup string
    The ID of the resource group where you want to create the network ACL.
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    Rules []IsNetworkAclRuleTypeArgs

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    Tags []string
    Tags associated with the network ACL.
    Timeouts IsNetworkAclTimeoutsArgs
    Vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags List<String>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    crn String
    (String) The CRN of the network ACL.
    isNetworkAclId String
    (String) The rule ID.
    name String
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn String
    The crn of the resource
    resourceGroup String
    The ID of the resource group where you want to create the network ACL.
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    rules List<IsNetworkAclRule>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags List<String>
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeouts
    vpc String
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags string[]

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    crn string
    (String) The CRN of the network ACL.
    isNetworkAclId string
    (String) The rule ID.
    name string
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn string
    The crn of the resource
    resourceGroup string
    The ID of the resource group where you want to create the network ACL.
    resourceGroupName string
    The resource group name in which resource is provisioned
    resourceName string
    The name of the resource
    rules IsNetworkAclRule[]

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags string[]
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeouts
    vpc string
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    access_tags Sequence[str]

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    crn str
    (String) The CRN of the network ACL.
    is_network_acl_id str
    (String) The rule ID.
    name str
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resource_controller_url str
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resource_crn str
    The crn of the resource
    resource_group str
    The ID of the resource group where you want to create the network ACL.
    resource_group_name str
    The resource group name in which resource is provisioned
    resource_name str
    The name of the resource
    rules Sequence[IsNetworkAclRuleArgs]

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags Sequence[str]
    Tags associated with the network ACL.
    timeouts IsNetworkAclTimeoutsArgs
    vpc str
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
    accessTags List<String>

    A list of access management tags to attach to the network acl.

    Note: You can attach only those access tags that already exists. For more information, about creating access tags, see working with tags. You must have the access listed in the Granting users access to tag resources for access_tags access_tags must be in the format key:value.

    crn String
    (String) The CRN of the network ACL.
    isNetworkAclId String
    (String) The rule ID.
    name String
    The name of the network ACL. If unspecified, the name will be a hyphenated list of randomly-selected words.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
    resourceCrn String
    The crn of the resource
    resourceGroup String
    The ID of the resource group where you want to create the network ACL.
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    rules List<Property Map>

    A list of rules for a network ACL. The order in which the rules are added to the list determines the priority of the rules. For example, the first rule that you want to enforce must be specified as the first rule in this list.

    Nested scheme for rules:

    tags List<String>
    Tags associated with the network ACL.
    timeouts Property Map
    vpc String
    The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.

    Supporting Types

    IsNetworkAclRule, IsNetworkAclRuleArgs

    Action string
    Allow or deny matching network traffic.
    Destination string
    The destination IP address or CIDR block.
    Direction string
    Indicates whether the traffic to be matched is inbound or outbound.
    Name string
    The user-defined name for this rule.
    Source string
    The source IP address or CIDR block.
    Icmp IsNetworkAclRuleIcmp

    The protocol ICMP.

    Nested scheme for icmp:

    Id string
    (String) The rule ID.
    IpVersion string
    (String) The IP version of the rule.
    Subnets double
    (String) The subnets for the ACL rule.
    Tcp IsNetworkAclRuleTcp

    The TCP protocol.

    Nested scheme for tcp:

    Udp IsNetworkAclRuleUdp

    The UDP protocol.

    Nested scheme for udp:

    Action string
    Allow or deny matching network traffic.
    Destination string
    The destination IP address or CIDR block.
    Direction string
    Indicates whether the traffic to be matched is inbound or outbound.
    Name string
    The user-defined name for this rule.
    Source string
    The source IP address or CIDR block.
    Icmp IsNetworkAclRuleIcmp

    The protocol ICMP.

    Nested scheme for icmp:

    Id string
    (String) The rule ID.
    IpVersion string
    (String) The IP version of the rule.
    Subnets float64
    (String) The subnets for the ACL rule.
    Tcp IsNetworkAclRuleTcp

    The TCP protocol.

    Nested scheme for tcp:

    Udp IsNetworkAclRuleUdp

    The UDP protocol.

    Nested scheme for udp:

    action String
    Allow or deny matching network traffic.
    destination String
    The destination IP address or CIDR block.
    direction String
    Indicates whether the traffic to be matched is inbound or outbound.
    name String
    The user-defined name for this rule.
    source String
    The source IP address or CIDR block.
    icmp IsNetworkAclRuleIcmp

    The protocol ICMP.

    Nested scheme for icmp:

    id String
    (String) The rule ID.
    ipVersion String
    (String) The IP version of the rule.
    subnets Double
    (String) The subnets for the ACL rule.
    tcp IsNetworkAclRuleTcp

    The TCP protocol.

    Nested scheme for tcp:

    udp IsNetworkAclRuleUdp

    The UDP protocol.

    Nested scheme for udp:

    action string
    Allow or deny matching network traffic.
    destination string
    The destination IP address or CIDR block.
    direction string
    Indicates whether the traffic to be matched is inbound or outbound.
    name string
    The user-defined name for this rule.
    source string
    The source IP address or CIDR block.
    icmp IsNetworkAclRuleIcmp

    The protocol ICMP.

    Nested scheme for icmp:

    id string
    (String) The rule ID.
    ipVersion string
    (String) The IP version of the rule.
    subnets number
    (String) The subnets for the ACL rule.
    tcp IsNetworkAclRuleTcp

    The TCP protocol.

    Nested scheme for tcp:

    udp IsNetworkAclRuleUdp

    The UDP protocol.

    Nested scheme for udp:

    action str
    Allow or deny matching network traffic.
    destination str
    The destination IP address or CIDR block.
    direction str
    Indicates whether the traffic to be matched is inbound or outbound.
    name str
    The user-defined name for this rule.
    source str
    The source IP address or CIDR block.
    icmp IsNetworkAclRuleIcmp

    The protocol ICMP.

    Nested scheme for icmp:

    id str
    (String) The rule ID.
    ip_version str
    (String) The IP version of the rule.
    subnets float
    (String) The subnets for the ACL rule.
    tcp IsNetworkAclRuleTcp

    The TCP protocol.

    Nested scheme for tcp:

    udp IsNetworkAclRuleUdp

    The UDP protocol.

    Nested scheme for udp:

    action String
    Allow or deny matching network traffic.
    destination String
    The destination IP address or CIDR block.
    direction String
    Indicates whether the traffic to be matched is inbound or outbound.
    name String
    The user-defined name for this rule.
    source String
    The source IP address or CIDR block.
    icmp Property Map

    The protocol ICMP.

    Nested scheme for icmp:

    id String
    (String) The rule ID.
    ipVersion String
    (String) The IP version of the rule.
    subnets Number
    (String) The subnets for the ACL rule.
    tcp Property Map

    The TCP protocol.

    Nested scheme for tcp:

    udp Property Map

    The UDP protocol.

    Nested scheme for udp:

    IsNetworkAclRuleIcmp, IsNetworkAclRuleIcmpArgs

    Code double
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    Type double
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.
    Code float64
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    Type float64
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.
    code Double
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    type Double
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.
    code number
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    type number
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.
    code float
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    type float
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.
    code Number
    The ICMP traffic code to allow. Valid values from 0 to 255. If unspecified, all codes are allowed. This can only be specified if type is also specified.
    type Number
    The ICMP traffic type to allow. Valid values from 0 to 254. If unspecified, all types are allowed by this rule.

    IsNetworkAclRuleTcp, IsNetworkAclRuleTcpArgs

    PortMax double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    PortMin double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    SourcePortMax double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    SourcePortMin double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    PortMax float64
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    PortMin float64
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    SourcePortMax float64
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    SourcePortMin float64
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    portMax Double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin Double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax Double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin Double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    portMax number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    port_max float
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    port_min float
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    source_port_max float
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    source_port_min float
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    portMax Number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin Number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax Number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin Number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    IsNetworkAclRuleUdp, IsNetworkAclRuleUdpArgs

    PortMax double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    PortMin double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    SourcePortMax double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    SourcePortMin double

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    PortMax float64
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    PortMin float64
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    SourcePortMax float64
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    SourcePortMin float64

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    portMax Double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin Double
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax Double
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin Double

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    portMax number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin number

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    port_max float
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    port_min float
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    source_port_max float
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    source_port_min float

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    portMax Number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    portMin Number
    The lowest port in the range of ports to be matched; if unspecified, 1 is used.
    sourcePortMax Number
    The highest port in the range of ports to be matched; if unspecified, 65535 is used.
    sourcePortMin Number

    The lowest port in the range of ports to be matched; if unspecified, 1 is used.

    NOTE: Only one type of protocol out of icmp, tcp, or udp can be used to create a new rule. If none is provided, all is selected.

    IsNetworkAclTimeouts, IsNetworkAclTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    The ibm_is_network_acl resource can be imported by using the network ACL ID.

    Syntax

    $ pulumi import ibm:index/isNetworkAcl:IsNetworkAcl example <network_acl_id>
    

    Example

    $ pulumi import ibm:index/isNetworkAcl:IsNetworkAcl example d7bec597-4726-451f-8a63-1111132c
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud