Resource: aws_ec2_managed_prefix_list

Provides a managed prefix list resource.

Example Usage

Basic usage

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

  entry {
    cidr        = aws_vpc.example.cidr_block
    description = "Primary"
  }

  entry {
    cidr        = aws_vpc_ipv4_cidr_block_association.example.cidr_block
    description = "Secondary"
  }

  tags = {
    Env = "live"
  }
}

Argument Reference

This resource supports the following arguments:

entry

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 Lists using the id. For example:

import {
  to = aws_ec2_managed_prefix_list.default
  id = "pl-0570a1d2d725c16be"
}

Using terraform import, import Prefix Lists using the id. For example:

% terraform import aws_ec2_managed_prefix_list.default pl-0570a1d2d725c16be