Managed Prefix List Args
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
Properties
Address family (IPv4
or IPv6
) of this prefix list.
Configuration block for prefix list entry. Detailed below. Different entries may have overlapping CIDR blocks, but a particular CIDR should not be duplicated.
Maximum number of entries that this prefix list can contain.