Dynamically Adding Route Table Rules Using Terraform
In this post, we’ll see how we can read route table rules from a tfvars file and then create corresponding rules for a route table.
Pre-requisite: Terraform should be installed and access_key/IAM role should be configured to create resources in your AWS account. I am using Terraform version 0.14.6 but code should be working fine with 0.12+
Step 1: Download code given at https://github.com/vinycoolguy2015/awslambda/tree/master/terraform_aws_route_table