AclEntryAttachment

NOTE: Available in v1.162.0+.

NOTE: The maximum number of entries per acl is 300.

For information about acl entry attachment and how to use it, see Configure an acl 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 defaultAcl = new AliCloud.Slb.Acl("defaultAcl", new AliCloud.Slb.AclArgs
        {
            IpVersion = ipVersion,
        });
        var defaultAclEntryAttachment = new AliCloud.Slb.AclEntryAttachment("defaultAclEntryAttachment", new AliCloud.Slb.AclEntryAttachmentArgs
        {
            AclId = defaultAcl.Id,
            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
		}
		defaultAcl, err := slb.NewAcl(ctx, "defaultAcl", &slb.AclArgs{
			IpVersion: pulumi.String(ipVersion),
		})
		if err != nil {
			return err
		}
		_, err = slb.NewAclEntryAttachment(ctx, "defaultAclEntryAttachment", &slb.AclEntryAttachmentArgs{
			AclId:   defaultAcl.ID(),
			Entry:   pulumi.String("168.10.10.0/24"),
			Comment: pulumi.String("second"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.Acl;
import com.pulumi.alicloud.slb.AclArgs;
import com.pulumi.alicloud.slb.AclEntryAttachment;
import com.pulumi.alicloud.slb.AclEntryAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraformslbaclconfig");
        final var ipVersion = config.get("ipVersion").orElse("ipv4");
        var defaultAcl = new Acl("defaultAcl", AclArgs.builder()        
            .ipVersion(ipVersion)
            .build());

        var defaultAclEntryAttachment = new AclEntryAttachment("defaultAclEntryAttachment", AclEntryAttachmentArgs.builder()        
            .aclId(defaultAcl.id())
            .entry("168.10.10.0/24")
            .comment("second")
            .build());

    }
}
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_acl = alicloud.slb.Acl("defaultAcl", ip_version=ip_version)
default_acl_entry_attachment = alicloud.slb.AclEntryAttachment("defaultAclEntryAttachment",
    acl_id=default_acl.id,
    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 defaultAcl = new alicloud.slb.Acl("defaultAcl", {ipVersion: ipVersion});
const defaultAclEntryAttachment = new alicloud.slb.AclEntryAttachment("defaultAclEntryAttachment", {
    aclId: defaultAcl.id,
    entry: "168.10.10.0/24",
    comment: "second",
});
configuration:
  name:
    type: string
    default: terraformslbaclconfig
  ipVersion:
    type: string
    default: ipv4
resources:
  defaultAcl:
    type: alicloud:slb:Acl
    properties:
      ipVersion: ${ipVersion}
  defaultAclEntryAttachment:
    type: alicloud:slb:AclEntryAttachment
    properties:
      aclId: ${defaultAcl.id}
      entry: 168.10.10.0/24
      comment: second

Create AclEntryAttachment Resource

new AclEntryAttachment(name: string, args: AclEntryAttachmentArgs, opts?: CustomResourceOptions);
@overload
def AclEntryAttachment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       acl_id: Optional[str] = None,
                       comment: Optional[str] = None,
                       entry: Optional[str] = None)
@overload
def AclEntryAttachment(resource_name: str,
                       args: AclEntryAttachmentArgs,
                       opts: Optional[ResourceOptions] = None)
func NewAclEntryAttachment(ctx *Context, name string, args AclEntryAttachmentArgs, opts ...ResourceOption) (*AclEntryAttachment, error)
public AclEntryAttachment(string name, AclEntryAttachmentArgs args, CustomResourceOptions? opts = null)
public AclEntryAttachment(String name, AclEntryAttachmentArgs args)
public AclEntryAttachment(String name, AclEntryAttachmentArgs args, CustomResourceOptions options)
type: alicloud:slb:AclEntryAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

AclEntryAttachment 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 AclEntryAttachment resource accepts the following input properties:

AclId string

The ID of the Acl.

Entry string

The CIDR blocks.

Comment string

The comment of the entry.

AclId string

The ID of the Acl.

Entry string

The CIDR blocks.

Comment string

The comment of the entry.

aclId String

The ID of the Acl.

entry String

The CIDR blocks.

comment String

The comment of the entry.

aclId string

The ID of the Acl.

entry string

The CIDR blocks.

comment string

The comment of the entry.

acl_id str

The ID of the Acl.

entry str

The CIDR blocks.

comment str

The comment of the entry.

aclId String

The ID of the Acl.

entry String

The CIDR blocks.

comment String

The comment of the entry.

Outputs

All input properties are implicitly available as output properties. Additionally, the AclEntryAttachment 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 Existing AclEntryAttachment Resource

Get an existing AclEntryAttachment 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?: AclEntryAttachmentState, opts?: CustomResourceOptions): AclEntryAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl_id: Optional[str] = None,
        comment: Optional[str] = None,
        entry: Optional[str] = None) -> AclEntryAttachment
func GetAclEntryAttachment(ctx *Context, name string, id IDInput, state *AclEntryAttachmentState, opts ...ResourceOption) (*AclEntryAttachment, error)
public static AclEntryAttachment Get(string name, Input<string> id, AclEntryAttachmentState? state, CustomResourceOptions? opts = null)
public static AclEntryAttachment get(String name, Output<String> id, AclEntryAttachmentState 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:
AclId string

The ID of the Acl.

Comment string

The comment of the entry.

Entry string

The CIDR blocks.

AclId string

The ID of the Acl.

Comment string

The comment of the entry.

Entry string

The CIDR blocks.

aclId String

The ID of the Acl.

comment String

The comment of the entry.

entry String

The CIDR blocks.

aclId string

The ID of the Acl.

comment string

The comment of the entry.

entry string

The CIDR blocks.

acl_id str

The ID of the Acl.

comment str

The comment of the entry.

entry str

The CIDR blocks.

aclId String

The ID of the Acl.

comment String

The comment of the entry.

entry String

The CIDR blocks.

Import

Acl entry attachment can be imported using the id, e.g.

 $ pulumi import alicloud:slb/aclEntryAttachment:AclEntryAttachment example <acl_id>:<entry>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.