ibm.IsNetworkAcl
Explore with Pulumi AI
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:
- 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 formatkey:value
.- Is
Network stringAcl Id - (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.
- Resource
Group string - The ID of the resource group where you want to create the network ACL.
- Rules
List<Is
Network Acl Rule> 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
:- List<string>
- Tags associated with the network ACL.
- Timeouts
Is
Network Acl Timeouts - Vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- []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 formatkey:value
.- Is
Network stringAcl Id - (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.
- Resource
Group string - The ID of the resource group where you want to create the network ACL.
- Rules
[]Is
Network Acl Rule Type Args 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
:- []string
- Tags associated with the network ACL.
- Timeouts
Is
Network Acl Timeouts Args - Vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- is
Network StringAcl Id - (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.
- resource
Group String - The ID of the resource group where you want to create the network ACL.
- rules
List<Is
Network Acl Rule> 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
:- List<String>
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts - vpc String
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- is
Network stringAcl Id - (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.
- resource
Group string - The ID of the resource group where you want to create the network ACL.
- rules
Is
Network Acl Rule[] 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
:- string[]
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts - vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- is_
network_ stracl_ id - (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[Is
Network Acl Rule Args] 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
:- Sequence[str]
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts Args - vpc str
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- is
Network StringAcl Id - (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.
- resource
Group 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
:- 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.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- Resource
Crn string - The crn of the resource
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name 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.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- Resource
Crn string - The crn of the resource
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name 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.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn String - The crn of the resource
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name 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.
- resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn string - The crn of the resource
- resource
Group stringName - The resource group name in which resource is provisioned
- resource
Name 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_ strurl - 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_ strname - 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.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn String - The crn of the resource
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name 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.
- 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 formatkey:value
.- Crn string
- (String) The CRN of the network ACL.
- Is
Network stringAcl Id - (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.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- Resource
Crn string - The crn of the resource
- Resource
Group string - The ID of the resource group where you want to create the network ACL.
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Rules
List<Is
Network Acl Rule> 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
:- List<string>
- Tags associated with the network ACL.
- Timeouts
Is
Network Acl Timeouts - Vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- []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 formatkey:value
.- Crn string
- (String) The CRN of the network ACL.
- Is
Network stringAcl Id - (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.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- Resource
Crn string - The crn of the resource
- Resource
Group string - The ID of the resource group where you want to create the network ACL.
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Rules
[]Is
Network Acl Rule Type Args 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
:- []string
- Tags associated with the network ACL.
- Timeouts
Is
Network Acl Timeouts Args - Vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- crn String
- (String) The CRN of the network ACL.
- is
Network StringAcl Id - (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.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn String - The crn of the resource
- resource
Group String - The ID of the resource group where you want to create the network ACL.
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name String - The name of the resource
- rules
List<Is
Network Acl Rule> 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
:- List<String>
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts - vpc String
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- crn string
- (String) The CRN of the network ACL.
- is
Network stringAcl Id - (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.
- resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn string - The crn of the resource
- resource
Group string - The ID of the resource group where you want to create the network ACL.
- resource
Group stringName - The resource group name in which resource is provisioned
- resource
Name string - The name of the resource
- rules
Is
Network Acl Rule[] 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
:- string[]
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts - vpc string
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- crn str
- (String) The CRN of the network ACL.
- is_
network_ stracl_ id - (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_ strurl - 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_ strname - The resource group name in which resource is provisioned
- resource_
name str - The name of the resource
- rules
Sequence[Is
Network Acl Rule Args] 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
:- Sequence[str]
- Tags associated with the network ACL.
- timeouts
Is
Network Acl Timeouts Args - vpc str
- The VPC ID. This parameter is required if you want to create a network ACL for a Generation 2 VPC.
- 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 formatkey:value
.- crn String
- (String) The CRN of the network ACL.
- is
Network StringAcl Id - (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.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance
- resource
Crn String - The crn of the resource
- resource
Group String - The ID of the resource group where you want to create the network ACL.
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name 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
:- 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
ordeny
matching network traffic.- Destination string
- The destination IP address or CIDR block.
- Direction string
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - Name string
- The user-defined name for this rule.
- Source string
- The source IP address or CIDR block.
- Icmp
Is
Network Acl Rule Icmp The protocol ICMP.
Nested scheme for
icmp
:- Id string
- (String) The rule ID.
- Ip
Version string - (String) The IP version of the rule.
- Subnets double
- (String) The subnets for the ACL rule.
- Tcp
Is
Network Acl Rule Tcp The TCP protocol.
Nested scheme for
tcp
:- Udp
Is
Network Acl Rule Udp The UDP protocol.
Nested scheme for
udp
:
- Action string
Allow
ordeny
matching network traffic.- Destination string
- The destination IP address or CIDR block.
- Direction string
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - Name string
- The user-defined name for this rule.
- Source string
- The source IP address or CIDR block.
- Icmp
Is
Network Acl Rule Icmp The protocol ICMP.
Nested scheme for
icmp
:- Id string
- (String) The rule ID.
- Ip
Version string - (String) The IP version of the rule.
- Subnets float64
- (String) The subnets for the ACL rule.
- Tcp
Is
Network Acl Rule Tcp The TCP protocol.
Nested scheme for
tcp
:- Udp
Is
Network Acl Rule Udp The UDP protocol.
Nested scheme for
udp
:
- action String
Allow
ordeny
matching network traffic.- destination String
- The destination IP address or CIDR block.
- direction String
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - name String
- The user-defined name for this rule.
- source String
- The source IP address or CIDR block.
- icmp
Is
Network Acl Rule Icmp The protocol ICMP.
Nested scheme for
icmp
:- id String
- (String) The rule ID.
- ip
Version String - (String) The IP version of the rule.
- subnets Double
- (String) The subnets for the ACL rule.
- tcp
Is
Network Acl Rule Tcp The TCP protocol.
Nested scheme for
tcp
:- udp
Is
Network Acl Rule Udp The UDP protocol.
Nested scheme for
udp
:
- action string
Allow
ordeny
matching network traffic.- destination string
- The destination IP address or CIDR block.
- direction string
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - name string
- The user-defined name for this rule.
- source string
- The source IP address or CIDR block.
- icmp
Is
Network Acl Rule Icmp The protocol ICMP.
Nested scheme for
icmp
:- id string
- (String) The rule ID.
- ip
Version string - (String) The IP version of the rule.
- subnets number
- (String) The subnets for the ACL rule.
- tcp
Is
Network Acl Rule Tcp The TCP protocol.
Nested scheme for
tcp
:- udp
Is
Network Acl Rule Udp The UDP protocol.
Nested scheme for
udp
:
- action str
Allow
ordeny
matching network traffic.- destination str
- The destination IP address or CIDR block.
- direction str
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - name str
- The user-defined name for this rule.
- source str
- The source IP address or CIDR block.
- icmp
Is
Network Acl Rule Icmp 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
Is
Network Acl Rule Tcp The TCP protocol.
Nested scheme for
tcp
:- udp
Is
Network Acl Rule Udp The UDP protocol.
Nested scheme for
udp
:
- action String
Allow
ordeny
matching network traffic.- destination String
- The destination IP address or CIDR block.
- direction String
- Indicates whether the traffic to be matched is
inbound
oroutbound
. - 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.
- ip
Version 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
IsNetworkAclRuleTcp, IsNetworkAclRuleTcpArgs
- Port
Max double - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Port
Min double - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- Source
Port doubleMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Source
Port doubleMin - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- Port
Max float64 - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Port
Min float64 - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- Source
Port float64Max - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Source
Port float64Min - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- port
Max Double - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min Double - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port DoubleMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port DoubleMin - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- port
Max number - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min number - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port numberMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port numberMin - 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_ floatmax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source_
port_ floatmin - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- port
Max Number - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min Number - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port NumberMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port NumberMin - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
IsNetworkAclRuleUdp, IsNetworkAclRuleUdpArgs
- Port
Max double - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Port
Min double - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- Source
Port doubleMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Source
Port doubleMin 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 float64 - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Port
Min float64 - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- Source
Port float64Max - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- Source
Port float64Min 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 Double - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min Double - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port DoubleMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port DoubleMin 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 number - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min number - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port numberMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port numberMin 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_ floatmax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source_
port_ floatmin 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 Number - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- port
Min Number - The lowest port in the range of ports to be matched; if unspecified, 1 is used.
- source
Port NumberMax - The highest port in the range of ports to be matched; if unspecified, 65535 is used.
- source
Port NumberMin 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
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.