Resource: awsEc2ManagedPrefixListEntry
Provides a managed prefix list entry resource.
\~> NOTE on Managed Prefix Lists and Managed Prefix List Entries: Terraform 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 Managed Prefix Lists with many entries: To improved execution times on larger updates, if you plan to create a prefix list with more than 100 entries, it is recommended that you use the inline entry
block as part of the Managed Prefix List resource resource instead.
Example Usage
Basic usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsEc2ManagedPrefixListExample =
new aws.ec2ManagedPrefixList.Ec2ManagedPrefixList(this, "example", {
addressFamily: "IPv4",
maxEntries: 5,
name: "All VPC CIDR-s",
tags: {
Env: "live",
},
});
new aws.ec2ManagedPrefixListEntry.Ec2ManagedPrefixListEntryA(this, "entry_1", {
cidr: "${aws_vpc.example.cidr_block}",
description: "Primary",
prefixListId: awsEc2ManagedPrefixListExample.id,
});
Argument Reference
The following arguments are supported:
cidr
- (Required) CIDR block of this entry.description
- (Optional) Description of this entry. Due to API limitations, updating only the description of an entry requires recreating the entry.prefixListId
- (Required) CIDR block of this entry.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- ID of the managed prefix list entry.
Import
Prefix List Entries can be imported using the prefixListId
and cidr
separated by a ,
, e.g.,