Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.19.0 published on Friday, Mar 18, 2022 by Pulumi

Acl

An access control list contains multiple IP addresses or CIDR blocks. The access control list can help you to define multiple instance listening dimension, and to meet the multiple usage for single access control list.

Server Load Balancer allows you to configure access control for listeners. You can configure different whitelists or blacklists for different listeners.

You can configure access control when you create a listener or change access control configuration after a listener is created.

NOTE: One access control list can be attached to many Listeners in different load balancer as whitelists or blacklists.

NOTE: The maximum number of access control lists per region is 50.

NOTE: The maximum number of IP addresses added each time is 50.

NOTE: The maximum number of entries per access control list is 300.

NOTE: The maximum number of listeners that an access control list can be added to is 50.

For information about slb and how to use it, see What is Server Load Balancer.

For information about acl and how to use it, see Configure an access control list.

Entry Block

The entry mapping supports the following:

  • entry - (Required) An IP addresses or CIDR blocks.
  • comment - (Optional) the comment of the entry.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraformslbaclconfig";
        var ipVersion = config.Get("ipVersion") ?? "ipv4";
        var @default = new AliCloud.Slb.Acl("default", new AliCloud.Slb.AclArgs
        {
            IpVersion = ipVersion,
            EntryLists = 
            {
                new AliCloud.Slb.Inputs.AclEntryListArgs
                {
                    Entry = "10.10.10.0/24",
                    Comment = "first",
                },
                new AliCloud.Slb.Inputs.AclEntryListArgs
                {
                    Entry = "168.10.10.0/24",
                    Comment = "second",
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraformslbaclconfig"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		ipVersion := "ipv4"
		if param := cfg.Get("ipVersion"); param != "" {
			ipVersion = param
		}
		_, err := slb.NewAcl(ctx, "default", &slb.AclArgs{
			IpVersion: pulumi.String(ipVersion),
			EntryLists: slb.AclEntryListArray{
				&slb.AclEntryListArgs{
					Entry:   pulumi.String("10.10.10.0/24"),
					Comment: pulumi.String("first"),
				},
				&slb.AclEntryListArgs{
					Entry:   pulumi.String("168.10.10.0/24"),
					Comment: pulumi.String("second"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraformslbaclconfig"
ip_version = config.get("ipVersion")
if ip_version is None:
    ip_version = "ipv4"
default = alicloud.slb.Acl("default",
    ip_version=ip_version,
    entry_lists=[
        alicloud.slb.AclEntryListArgs(
            entry="10.10.10.0/24",
            comment="first",
        ),
        alicloud.slb.AclEntryListArgs(
            entry="168.10.10.0/24",
            comment="second",
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraformslbaclconfig";
const ipVersion = config.get("ipVersion") || "ipv4";
const _default = new alicloud.slb.Acl("default", {
    ipVersion: ipVersion,
    entryLists: [
        {
            entry: "10.10.10.0/24",
            comment: "first",
        },
        {
            entry: "168.10.10.0/24",
            comment: "second",
        },
    ],
});

Coming soon!

Create a Acl Resource

new Acl(name: string, args?: AclArgs, opts?: CustomResourceOptions);
@overload
def Acl(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        entry_lists: Optional[Sequence[AclEntryListArgs]] = None,
        ip_version: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None)
@overload
def Acl(resource_name: str,
        args: Optional[AclArgs] = None,
        opts: Optional[ResourceOptions] = None)
func NewAcl(ctx *Context, name string, args *AclArgs, opts ...ResourceOption) (*Acl, error)
public Acl(string name, AclArgs? args = null, CustomResourceOptions? opts = null)
public Acl(String name, AclArgs args)
public Acl(String name, AclArgs args, CustomResourceOptions options)
type: alicloud:slb:Acl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AclArgs
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 AclArgs
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 AclArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AclArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Acl Resource Properties

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

Inputs

The Acl resource accepts the following input properties:

EntryLists List<Pulumi.AliCloud.Slb.Inputs.AclEntryListArgs>

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

IpVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

Name string

Name of the access control list.

ResourceGroupId string

Resource group ID.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

EntryLists []AclEntryListArgs

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

IpVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

Name string

Name of the access control list.

ResourceGroupId string

Resource group ID.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

entryLists ListEntryListArgs>

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion String

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name String

Name of the access control list.

resourceGroupId String

Resource group ID.

tags Map

A mapping of tags to assign to the resource.

entryLists AclEntryListArgs[]

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name string

Name of the access control list.

resourceGroupId string

Resource group ID.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

entry_lists Sequence[AclEntryListArgs]

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ip_version str

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name str

Name of the access control list.

resource_group_id str

Resource group ID.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

entryLists List

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion String

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name String

Name of the access control list.

resourceGroupId String

Resource group ID.

tags Map

A mapping of tags to assign to the resource.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Acl Resource

Get an existing Acl 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?: AclState, opts?: CustomResourceOptions): Acl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        entry_lists: Optional[Sequence[AclEntryListArgs]] = None,
        ip_version: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None) -> Acl
func GetAcl(ctx *Context, name string, id IDInput, state *AclState, opts ...ResourceOption) (*Acl, error)
public static Acl Get(string name, Input<string> id, AclState? state, CustomResourceOptions? opts = null)
public static Acl get(String name, Output<String> id, AclState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
EntryLists List<Pulumi.AliCloud.Slb.Inputs.AclEntryListArgs>

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

IpVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

Name string

Name of the access control list.

ResourceGroupId string

Resource group ID.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

EntryLists []AclEntryListArgs

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

IpVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

Name string

Name of the access control list.

ResourceGroupId string

Resource group ID.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

entryLists ListEntryListArgs>

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion String

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name String

Name of the access control list.

resourceGroupId String

Resource group ID.

tags Map

A mapping of tags to assign to the resource.

entryLists AclEntryListArgs[]

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion string

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name string

Name of the access control list.

resourceGroupId string

Resource group ID.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

entry_lists Sequence[AclEntryListArgs]

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ip_version str

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name str

Name of the access control list.

resource_group_id str

Resource group ID.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

entryLists List

A list of entry (IP addresses or CIDR blocks) to be added. At most 50 etnry can be supported in one resource. It contains two sub-fields as Entry Block follows.

ipVersion String

The IP Version of access control list is the type of its entry (IP addresses or CIDR blocks). It values ipv4/ipv6. Our plugin provides a default ip_version: "ipv4".

name String

Name of the access control list.

resourceGroupId String

Resource group ID.

tags Map

A mapping of tags to assign to the resource.

Supporting Types

AclEntryList

Entry string
Comment string
Entry string
Comment string
entry String
comment String
entry string
comment string
entry str
comment str
entry String
comment String

Import

Server Load balancer access control list can be imported using the id, e.g.

 $ pulumi import alicloud:slb/acl:Acl example acl-abc123456

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.