Managed Prefix Lists
Create or Reference and Existing Managed Prefix List
The example below will create a managed prefix list named test-prefix-list and reference a built-in managed prefix list named route53-healthchecks. The key in the map object is the name that will be used to reference the prefix list in other parts of the tfvars configuration.
Reference a Managed Prefix List in a Security Group Rule
The example below will create security group ingress rule named Test_Existing_Prefix_List_Allow_Ping that allows ICMP traffic from the existing managed prefix list route53-healthchecks and another security group rule named Test_New_Prefix_List_Allow_Ping that allows ICMP traffic from the newly created managed prefix list test-prefix-list.
Note: This example does not represent a complete configuration, only the relevant portion for referencing managed prefix lists in security group rules.
Import an existing Managed Prefix List and Entries
When importing a populated prefix_list, you will also need to import each individual prefix_list_entry. The examples below show the import block and the related resource code.
Resource configuration
Import block
Note the following:
- The pl-* id is the same in both the managed_prefix_list and managed_prefix_list_entry import blocks.
- In the managed_prefix_list_entry, that id is suffixed with ,cidr
- In the managed_prefix_list_entry, you will use the prefix_list key name + the entry subkey name. E.g., existing-prefix-list-name.namedEntry1