cloudposse / terraform-aws-vpc

Terraform Module that defines a VPC with public/private subnets across multiple AZs with Internet Gateways
https://cloudposse.com/accelerate
Apache License 2.0
229 stars 195 forks source link

WIP: Add ipv4_ipam_pool_id & ipv4_netmask_length #102

Closed jbouse closed 2 years ago

jbouse commented 2 years ago

what

why

jbouse commented 2 years ago

@Nuru this is a modification I was working on locally and mentioned in last weeks office hours. Was suggested I run past you to get your thoughts.

korenyoni commented 2 years ago

/test all

korenyoni commented 2 years ago

@jbouse sorry for the late review.

Tests are failing because of conflicting arguments at the provider level:

TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: Error: Conflicting configuration arguments
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66:   on ../../main.tf line 17, in resource "aws_vpc" "default":
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66:   17:   cidr_block                       = var.cidr_block
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: "cidr_block": conflicts with ipv4_netmask_length
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: Error: Missing required argument
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66:   on ../../main.tf line 19, in resource "aws_vpc" "default":
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66:   19:   ipv4_netmask_length              = var.ipv4_netmask_length
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: 
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: "ipv4_netmask_length": all of `ipv4_ipam_pool_id,ipv4_netmask_length` must be
TestExamplesComplete 2022-02-10T17:42:02Z logger.go:66: specified
jbouse commented 2 years ago

@korenyoni I'll go back and take another look at this... The use case I'm working on is being able to use AWS IPAM when deploying out the VPC so it would either use cidr_block or ipv4_ipam_pool_id & ipv4_netmask_length. The two should be mutually exclusive. You couldn't set all 3 variables obviously as they would conflict.

Nuru commented 2 years ago

/test all

Nuru commented 2 years ago

@jbouse IPv6 and IPAM support released in v1.1.0. Please try it out and report any issues.