ManagedPrefixListArgs

data class ManagedPrefixListArgs(val addressFamily: Output<String>? = null, val entries: Output<List<ManagedPrefixListEntryArgs>>? = null, val maxEntries: Output<Int>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ManagedPrefixListArgs>

Provides a managed prefix list resource.

NOTE on Managed Prefix Lists and Managed Prefix List Entries: The provider currently provides both a standalone Managed Prefix List Entry resource (a single entry), and a Managed Prefix List resource with entries defined in-line. At this time you cannot use a Managed Prefix List with in-line rules in conjunction with any Managed Prefix List Entry resources. Doing so will cause a conflict of entries and will overwrite entries. NOTE on max_entries: When you reference a Prefix List in a resource, the maximum number of entries for the prefix lists counts as the same number of rules or entries for the resource. For example, if you create a prefix list with a maximum of 20 entries and you reference that prefix list in a security group rule, this counts as 20 rules for the security group.

Example Usage

Basic usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.ManagedPrefixList;
import com.pulumi.aws.ec2.ManagedPrefixListArgs;
import com.pulumi.aws.ec2.inputs.ManagedPrefixListEntryArgs;
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 example = new ManagedPrefixList("example", ManagedPrefixListArgs.builder()
.addressFamily("IPv4")
.maxEntries(5)
.entries(
ManagedPrefixListEntryArgs.builder()
.cidr(aws_vpc.example().cidr_block())
.description("Primary")
.build(),
ManagedPrefixListEntryArgs.builder()
.cidr(aws_vpc_ipv4_cidr_block_association.example().cidr_block())
.description("Secondary")
.build())
.tags(Map.of("Env", "live"))
.build());
}
}

Import

Prefix Lists can be imported using the id, e.g.,

$ pulumi import aws:ec2/managedPrefixList:ManagedPrefixList default pl-0570a1d2d725c16be

Constructors

Link copied to clipboard
constructor(addressFamily: Output<String>? = null, entries: Output<List<ManagedPrefixListEntryArgs>>? = null, maxEntries: Output<Int>? = null, name: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val addressFamily: Output<String>? = null

Address family (IPv4 or IPv6) of this prefix list.

Link copied to clipboard

Configuration block for prefix list entry. Detailed below. Different entries may have overlapping CIDR blocks, but a particular CIDR should not be duplicated.

Link copied to clipboard
val maxEntries: Output<Int>? = null

Maximum number of entries that this prefix list can contain.

Link copied to clipboard
val name: Output<String>? = null

Name of this resource. The name must not start with com.amazonaws.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ManagedPrefixListArgs