Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipv4_network_definition is not a managed PL #19

Open
dbillon opened this issue Nov 21, 2024 · 3 comments
Open

ipv4_network_definition is not a managed PL #19

dbillon opened this issue Nov 21, 2024 · 3 comments

Comments

@dbillon
Copy link

dbillon commented Nov 21, 2024

Hello,

From this module documentation:

The variable var.ipv4_network_definition is an attribute to configure a supernet (IPv4 CIDR block) or managed prefix list of your network/VPCs in AWS.

But it seems that the module consider var.ipv4_network_definition as an AWS Prefix List: from modules/egress_vpc:

data "aws_prefix_list" "ipv4_network_definition" {
  count = startswith(coalesce(var.ipv4_network_definition, " "), "pl-") ? 1 : 0

  prefix_list_id = var.ipv4_network_definition
}

Thus it can't find a customer managed Prefix Lists.

BR,

Damien.

@pablo19sc
Copy link
Collaborator

Hi!

Thanks for your comment.

I don't fully understand your question here. What are you trying to achieve and what's the error?

That variable expects either a list of CIDRs or a customer-managed prefix list (in case you don't have a contiguous block that you define in a supernet). This variable is used in the corresponding VPCs (mainly the egress/ingress ones) to route to the Core Network.

Regards,
Pablo

@dbillon
Copy link
Author

dbillon commented Dec 11, 2024

Hi Pablo,

I used a workaround but from what I remember, if I put a Customer-managed prefix list in ipv4_network_definition I get an error.

It seems due to the fact that the "egress_vpc" module looks up this var from the aws_prefix_list Terraform resource. I guess that it should also try to find this prefix list from aws_ec2_managed_prefix_list Terraform resource. Terraform publishes different resources for Customer-managed prefix lists and for AWS-managed prefix lists.

Hope this helps.

BR, Damien.

@pablo19sc
Copy link
Collaborator

Oh I see. Can you provide an example of code that gives the error? To fully test exactly the same example you were checking, and see if it's something we need to check as functionality or simply a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants