-
Notifications
You must be signed in to change notification settings - Fork 104
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
Is it possible to create a VPC without IPv6? #133
Comments
Hi thanks for opening this issue. can you please share your config and the output from your plan |
Here we have: name = "vpc-teste1" vpc_assign_generated_ipv6_cidr_block = false subnets = { tags = { The plan ran fine: Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
Terraform will perform the following actions: module.vpc.aws_eip.nat["us-east-1a"] will be created
module.vpc.aws_internet_gateway.main[0] will be created
module.vpc.aws_nat_gateway.main["us-east-1a"] will be created
module.vpc.aws_route.private_to_nat["private/us-east-1a"] will be created
module.vpc.aws_route.private_to_nat["private/us-east-1b"] will be created
module.vpc.aws_route.private_to_nat["private/us-east-1c"] will be created
module.vpc.aws_route.public_ipv6_to_igw["us-east-1a"] will be created
module.vpc.aws_route.public_ipv6_to_igw["us-east-1b"] will be created
module.vpc.aws_route.public_ipv6_to_igw["us-east-1c"] will be created
module.vpc.aws_route.public_to_igw["us-east-1a"] will be created
module.vpc.aws_route.public_to_igw["us-east-1b"] will be created
module.vpc.aws_route.public_to_igw["us-east-1c"] will be created
module.vpc.aws_route_table.private["private/us-east-1a"] will be created
module.vpc.aws_route_table.private["private/us-east-1b"] will be created
module.vpc.aws_route_table.private["private/us-east-1c"] will be created
module.vpc.aws_route_table.public["us-east-1a"] will be created
module.vpc.aws_route_table.public["us-east-1b"] will be created
module.vpc.aws_route_table.public["us-east-1c"] will be created
module.vpc.aws_route_table_association.private["private/us-east-1a"] will be created
module.vpc.aws_route_table_association.private["private/us-east-1b"] will be created
module.vpc.aws_route_table_association.private["private/us-east-1c"] will be created
module.vpc.aws_route_table_association.public["us-east-1a"] will be created
module.vpc.aws_route_table_association.public["us-east-1b"] will be created
module.vpc.aws_route_table_association.public["us-east-1c"] will be created
module.vpc.aws_subnet.private["private/us-east-1a"] will be created
module.vpc.aws_subnet.private["private/us-east-1b"] will be created
module.vpc.aws_subnet.private["private/us-east-1c"] will be created
module.vpc.aws_subnet.public["us-east-1a"] will be created
module.vpc.aws_subnet.public["us-east-1b"] will be created
module.vpc.aws_subnet.public["us-east-1c"] will be created
module.vpc.aws_vpc.main[0] will be created
Plan: 31 to add, 0 to change, 0 to destroy. ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if But apply has an function error: |
Sure! Thanks for help. This is the config
This is execution output:
|
also, by default the ipv6 param is module "vpc" {
source = "aws-ia/vpc/aws"
version = ">= 4.3.0"
name = "vpc-teste1"
cidr_block = "192.168.0.0/16"
az_count = 3
vpc_enable_dns_hostnames = true
vpc_enable_dns_support = true
subnets = {
# Dual-stack subnet
public = {
# name_prefix = "my_public" # omit to prefix with "public"
netmask = 24
connect_to_igw = true # default
nat_gateway_configuration = "single_az" # options: "all_azs", "none"
}
# IPv4 only subnet
private = {
# omitting name_prefix defaults value to "private"
# name_prefix = "private_with_egress"
netmask = 24
connect_to_public_natgw = true
}
}
tags = {
Billing = "infrastructure"
}
} |
Perfect now! Maybe because "false" is something to be evaluated in the conditional expression. Thanks. |
Can you confirm ... was it removing the vpc_assign_generated_ipv6_cidr_block = false
vpc_egress_only_internet_gateway = false |
Removing from top:
and from inside public and private subnets:
|
@pablo19sc I wonder if we can improve logic or variable validation to prevent this in the future. I think its low priority but if there is a quick win might be good... |
Since this issue regards several variables var validation will not work. However, a |
Looks like always IPv6 will be used.
Thanks!
The text was updated successfully, but these errors were encountered: