diff --git a/examples/basic_usage/main.tf b/examples/basic_usage/main.tf index 8970a02..d91a1c1 100644 --- a/examples/basic_usage/main.tf +++ b/examples/basic_usage/main.tf @@ -18,9 +18,9 @@ resource "aws_vpc" "the_vpc" { } resource "aws_subnet" "the_subnet" { - vpc_id = aws_vpc.the_vpc.id - cidr_block = "10.75.1.0/24" availability_zone = "${var.aws_region}${var.aws_availability_zone}" + cidr_block = "10.75.1.0/24" + vpc_id = aws_vpc.the_vpc.id } #------------------------------------------------------------------------------- @@ -39,9 +39,9 @@ resource "aws_default_route_table" "the_route_table" { # Route all external traffic through the internet gateway resource "aws_route" "route_external_traffic_through_internet_gateway" { - route_table_id = aws_default_route_table.the_route_table.id destination_cidr_block = "0.0.0.0/0" gateway_id = aws_internet_gateway.the_igw.id + route_table_id = aws_default_route_table.the_route_table.id } #------------------------------------------------------------------------------- @@ -50,8 +50,8 @@ resource "aws_route" "route_external_traffic_through_internet_gateway" { module "ipsec_tunnel" { source = "../.." - aws_region = var.aws_region aws_availability_zone = var.aws_availability_zone + aws_region = var.aws_region remote_cidr_blocks = var.remote_cidr_blocks remote_ip = var.remote_ip route_table_ids = var.route_table_ids diff --git a/examples/basic_usage/variables.tf b/examples/basic_usage/variables.tf index 8723c9f..035e4c8 100644 --- a/examples/basic_usage/variables.tf +++ b/examples/basic_usage/variables.tf @@ -5,38 +5,38 @@ # ------------------------------------------------------------------------------ variable "aws_availability_zone" { - type = string description = "The AWS availability zone where the Virtual Private Gateway is to be deployed (e.g. a, b, c, etc.)." + type = string } variable "aws_region" { - type = string description = "The AWS region where the Virtual Private Gateway is to be deployed (e.g. us-east-1)." + type = string } variable "default_role_arn" { - type = string description = "The ARN of the role to assume for the default provider (e.g. arn:aws:iam::123456789abc:role/MyDefaultRole)." + type = string } variable "remote_cidr_blocks" { - type = list(string) description = "A list of CIDR blocks associated with the remote (non-AWS) end of the tunnel (e.g. [192.168.11.0/24, 10.10.11.0/24])." + type = list(string) } variable "remote_ip" { - type = string description = "The public IP of the remote (non-AWS) end of the tunnel (e.g. 1.2.3.4)." + type = string } variable "route_table_ids" { - type = list(string) description = "A list of ID corresponding to route tables that should route traffic through the VPN/IPSec gateway (e.g. [rtb-0123456789abcdef0, rtb-0123456789abcdef1])." + type = list(string) } variable "vpc_id" { - type = string description = "The ID of the AWS VPC where the Virtual private Gateway is to be deployed (e.g. vpc-0123456789abcdef0)." + type = string } @@ -47,7 +47,7 @@ variable "vpc_id" { # ------------------------------------------------------------------------------ variable "tags" { - type = map(string) - description = "Tags to apply to all AWS resources created." default = {} + description = "Tags to apply to all AWS resources created." + type = map(string) } diff --git a/variables.tf b/variables.tf index 6692519..0962fe2 100644 --- a/variables.tf +++ b/variables.tf @@ -5,33 +5,33 @@ # ------------------------------------------------------------------------------ variable "aws_availability_zone" { - type = string description = "The AWS availability zone where the Virtual Private Gateway is to be deployed (e.g. a, b, c, etc.)." + type = string } variable "aws_region" { - type = string description = "The AWS region where the Virtual Private Gateway is to be deployed (e.g. us-east-1)." + type = string } variable "remote_cidr_blocks" { - type = list(string) description = "A list of CIDR blocks associated with the remote (non-AWS) end of the tunnel (e.g. [192.168.11.0/24, 10.10.11.0/24])." + type = list(string) } variable "remote_ip" { - type = string description = "The public IP of the remote (non-AWS) end of the tunnel (e.g. 1.2.3.4)." + type = string } variable "route_table_ids" { - type = list(string) description = "A list of ID corresponding to route tables that should route traffic through the VPN/IPSec gateway (e.g. [rtb-0123456789abcdef0, rtb-0123456789abcdef1])." + type = list(string) } variable "vpc_id" { - type = string description = "The ID of the AWS VPC where the Virtual private Gateway is to be deployed (e.g. vpc-0123456789abcdef0)." + type = string } @@ -42,13 +42,13 @@ variable "vpc_id" { # ------------------------------------------------------------------------------ variable "remote_bgp_asn" { - type = number - description = "The BGP ASN of the remote (non-AWS) end of the tunnel (e.g. 11111). This value is not used if static_routes_only is true." default = 65000 + description = "The BGP ASN of the remote (non-AWS) end of the tunnel (e.g. 11111). This value is not used if static_routes_only is true." + type = number } variable "static_routes_only" { - type = bool - description = "A boolean value indicating whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don't support BGP." default = true + description = "A boolean value indicating whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don't support BGP." + type = bool }