From f961e8d98390fdb638c30ccc687a13d51cd1f813 Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Sun, 5 Oct 2025 17:06:36 +0200 Subject: [PATCH 1/3] docs: update note on conflict between aws_route and aws_route_table --- website/docs/r/route.html.markdown | 2 +- website/docs/r/route_table.html.markdown | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/website/docs/r/route.html.markdown b/website/docs/r/route.html.markdown index be2f60a86820..f068a71bb2e7 100644 --- a/website/docs/r/route.html.markdown +++ b/website/docs/r/route.html.markdown @@ -10,7 +10,7 @@ description: |- Provides a resource to create a routing table entry (a route) in a VPC routing table. -~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource and a [Route Table](route_table.html) resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite rules. +~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. ~> **NOTE on `gateway_id` attribute:** The AWS API is very forgiving with the resource ID passed in the `gateway_id` attribute. For example an `aws_route` resource can be created with an [`aws_nat_gateway`](nat_gateway.html) or [`aws_egress_only_internet_gateway`](egress_only_internet_gateway.html) ID specified for the `gateway_id` attribute. Specifying anything other than an [`aws_internet_gateway`](internet_gateway.html) or [`aws_vpn_gateway`](vpn_gateway.html) ID will lead to Terraform reporting a permanent diff between your configuration and recorded state, as the AWS API returns the more-specific attribute. If you are experiencing constant diffs with an `aws_route` resource, the first thing to check is that the correct attribute is being specified. diff --git a/website/docs/r/route_table.html.markdown b/website/docs/r/route_table.html.markdown index 2ca1209e04d0..351b7faffc3b 100644 --- a/website/docs/r/route_table.html.markdown +++ b/website/docs/r/route_table.html.markdown @@ -10,12 +10,6 @@ description: |- Provides a resource to create a VPC routing table. -~> **NOTE on Route Tables and Routes:** Terraform currently -provides both a standalone [Route resource](route.html) and a Route Table resource with routes -defined in-line. At this time you cannot use a Route Table with in-line routes -in conjunction with any Route resources. Doing so will cause -a conflict of rule settings and will overwrite rules. - ~> **NOTE on `gateway_id` and `nat_gateway_id`:** The AWS API is very forgiving with these two attributes and the `aws_route_table` resource can be created with a NAT ID specified as a Gateway ID attribute. This _will_ lead to a permanent diff between your configuration and statefile, as the API returns the correct @@ -125,6 +119,9 @@ This resource supports the following arguments: * `vpc_id` - (Required) The VPC ID. * `route` - (Optional) A list of route objects. Their keys are documented below. This argument is processed in [attribute-as-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). This means that omitting this argument is interpreted as ignoring any existing routes. To remove all managed routes an empty list should be specified. See the example above. + + ~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. + * `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `propagating_vgws` - (Optional) A list of virtual gateways for propagation. From 4ae15da01f511111a99a5f4fa50d5bf0ea5bcded Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Sun, 5 Oct 2025 21:15:32 +0200 Subject: [PATCH 2/3] fix: fix note indentation --- website/docs/r/route_table.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/route_table.html.markdown b/website/docs/r/route_table.html.markdown index 351b7faffc3b..f0e1c699e0e4 100644 --- a/website/docs/r/route_table.html.markdown +++ b/website/docs/r/route_table.html.markdown @@ -119,8 +119,8 @@ This resource supports the following arguments: * `vpc_id` - (Required) The VPC ID. * `route` - (Optional) A list of route objects. Their keys are documented below. This argument is processed in [attribute-as-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). This means that omitting this argument is interpreted as ignoring any existing routes. To remove all managed routes an empty list should be specified. See the example above. - - ~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. + +~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. * `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `propagating_vgws` - (Optional) A list of virtual gateways for propagation. From b65fdea64660e2f63f131fa07f07314a42f8a4a6 Mon Sep 17 00:00:00 2001 From: Stefan Freitag Date: Wed, 8 Oct 2025 16:17:18 +0200 Subject: [PATCH 3/3] docs: clarifies route and route table usage Clarifies that using inline route blocks within `aws_route_table` in conjunction with `aws_route` resources causes conflicts. --- website/docs/r/route.html.markdown | 2 +- website/docs/r/route_table.html.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/r/route.html.markdown b/website/docs/r/route.html.markdown index f068a71bb2e7..1c91388d2e14 100644 --- a/website/docs/r/route.html.markdown +++ b/website/docs/r/route.html.markdown @@ -10,7 +10,7 @@ description: |- Provides a resource to create a routing table entry (a route) in a VPC routing table. -~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. +~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource ([`aws_route`](route.html)) and a Route Table resource with routes defined in-line ([`aws_route_table`](route_table.html)). At this time you cannot use a [`aws_route_table`](route_table.html) inline `route` blocks in conjunction with any [`aws_route`](route.html) resources. Doing so will cause a conflict of rule settings and will overwrite rules. ~> **NOTE on `gateway_id` attribute:** The AWS API is very forgiving with the resource ID passed in the `gateway_id` attribute. For example an `aws_route` resource can be created with an [`aws_nat_gateway`](nat_gateway.html) or [`aws_egress_only_internet_gateway`](egress_only_internet_gateway.html) ID specified for the `gateway_id` attribute. Specifying anything other than an [`aws_internet_gateway`](internet_gateway.html) or [`aws_vpn_gateway`](vpn_gateway.html) ID will lead to Terraform reporting a permanent diff between your configuration and recorded state, as the AWS API returns the more-specific attribute. If you are experiencing constant diffs with an `aws_route` resource, the first thing to check is that the correct attribute is being specified. diff --git a/website/docs/r/route_table.html.markdown b/website/docs/r/route_table.html.markdown index f0e1c699e0e4..70cc25c8e2fd 100644 --- a/website/docs/r/route_table.html.markdown +++ b/website/docs/r/route_table.html.markdown @@ -120,7 +120,7 @@ This resource supports the following arguments: * `route` - (Optional) A list of route objects. Their keys are documented below. This argument is processed in [attribute-as-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). This means that omitting this argument is interpreted as ignoring any existing routes. To remove all managed routes an empty list should be specified. See the example above. -~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource (`aws_route`) and a Route Table resource with routes defined in-line (`aws_route_table`). At this time you cannot use a `aws_route_table` in conjunction with any `aws_route` resources. Doing so will cause a conflict of rule settings and will overwrite rules. +~> **NOTE on Route Tables and Routes:** Terraform currently provides both a standalone Route resource ([`aws_route`](route.html)) and a Route Table resource with routes defined in-line ([`aws_route_table`](route_table.html)). At this time you cannot use a [`aws_route_table`](route_table.html) inline `route` blocks in conjunction with any [`aws_route`](route.html) resources. Doing so will cause a conflict of rule settings and will overwrite rules. * `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level. * `propagating_vgws` - (Optional) A list of virtual gateways for propagation.