Tutorial 102 Doesn't Work with Latest Terraform AWS Provider
saurabh-sm opened this issue · 3 comments
saurabh-sm commented
Using the latest AWS provider gives the below error on terraform apply
after 25 minutes - during the creation of private worker nodes:
╷
│ Warning: Argument is deprecated
│
│ with aws_route_table.private,
│ on network.tf line 97, in resource "aws_route_table" "private":
│ 97: route = [
│ 98: {
│ 99: cidr_block = "0.0.0.0/0"
│ 100: nat_gateway_id = aws_nat_gateway.devops-research.id
│ 101: carrier_gateway_id = ""
│ 102: destination_prefix_list_id = ""
│ 103: egress_only_gateway_id = ""
│ 104: gateway_id = ""
│ 105: instance_id = ""
│ 106: ipv6_cidr_block = ""
│ 107: local_gateway_id = ""
│ 108: network_interface_id = ""
│ 109: transit_gateway_id = ""
│ 110: vpc_endpoint_id = ""
│ 111: vpc_peering_connection_id = ""
│ 112: },
│ 113: ]
│
│ Use network_interface_id instead
│
│ (and one more similar warning elsewhere)
╵
╷
│ Error: "" is not a valid CIDR block: invalid CIDR address:
│
│ with aws_route_table.private,
│ on network.tf line 97, in resource "aws_route_table" "private":
│ 97: route = [
│ 98: {
│ 99: cidr_block = "0.0.0.0/0"
│ 100: nat_gateway_id = aws_nat_gateway.devops-research.id
│ 101: carrier_gateway_id = ""
│ 102: destination_prefix_list_id = ""
│ 103: egress_only_gateway_id = ""
│ 104: gateway_id = ""
│ 105: instance_id = ""
│ 106: ipv6_cidr_block = ""
│ 107: local_gateway_id = ""
│ 108: network_interface_id = ""
│ 109: transit_gateway_id = ""
│ 110: vpc_endpoint_id = ""
│ 111: vpc_peering_connection_id = ""
│ 112: },
│ 113: ]
│
╵
╷
│ Error: "" is not a valid CIDR block: invalid CIDR address:
│
│ with aws_route_table.public,
│ on network.tf line 123, in resource "aws_route_table" "public":
│ 123: route = [
│ 124: {
│ 125: cidr_block = "0.0.0.0/0"
│ 126: gateway_id = aws_internet_gateway.devops-research.id
│ 127: nat_gateway_id = ""
│ 128: carrier_gateway_id = ""
│ 129: destination_prefix_list_id = ""
│ 130: egress_only_gateway_id = ""
│ 131: instance_id = ""
│ 132: ipv6_cidr_block = ""
│ 133: local_gateway_id = ""
│ 134: network_interface_id = ""
│ 135: transit_gateway_id = ""
│ 136: vpc_endpoint_id = ""
│ 137: vpc_peering_connection_id = ""
│ 138: },
│ 139: ]
│
╵
antonputra commented
Let me check it
antonputra commented
Works for me, versions
➜ terraform git:(main) terraform --version
Terraform v1.1.7
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v3.74.3
+ provider registry.terraform.io/hashicorp/tls v3.1.0
Result
Apply complete! Resources: 29 added, 0 changed, 0 destroyed.
Will verify for v4+ soon.
antonputra commented
Updated, you can reference it here - https://github.com/antonputra/tutorials/blob/main/lessons/112/terraform/5-routes.tf