Resource: aws_ec2_managed_prefix_list_entry

Use the aws_prefix_list_entry resource to manage a managed prefix list entry.

Example Usage

Basic usage.

resource "aws_ec2_managed_prefix_list" "example" {
  name           = "All VPC CIDR-s"
  address_family = "IPv4"
  max_entries    = 5

  tags = {
    Env = "live"
  }
}

resource "aws_ec2_managed_prefix_list_entry" "entry_1" {
  cidr           = aws_vpc.example.cidr_block
  description    = "Primary"
  prefix_list_id = aws_ec2_managed_prefix_list.example.id
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import prefix list entries using prefix_list_id and cidr separated by a comma (,). For example:

import {
  to = aws_ec2_managed_prefix_list_entry.default
  id = "pl-0570a1d2d725c16be,10.0.3.0/24"
}

Using terraform import, import prefix list entries using prefix_list_id and cidr separated by a comma (,). For example:

% terraform import aws_ec2_managed_prefix_list_entry.default pl-0570a1d2d725c16be,10.0.3.0/24