From 12b2adc9052d213f6677a242a2273c6621a73fdb Mon Sep 17 00:00:00 2001 From: Angie Pinilla Date: Wed, 19 Jan 2022 11:58:19 -0500 Subject: [PATCH] r/route and r/route_table: deprecate 'instance_id' --- internal/service/ec2/route.go | 1 + internal/service/ec2/route_table.go | 5 +++-- website/docs/r/route.html.markdown | 2 +- website/docs/r/route_table.html.markdown | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/service/ec2/route.go b/internal/service/ec2/route.go index 91cc643f8f72..445f5b5c7207 100644 --- a/internal/service/ec2/route.go +++ b/internal/service/ec2/route.go @@ -110,6 +110,7 @@ func ResourceRoute() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, + Deprecated: "Use network_interface_id instead", ExactlyOneOf: routeValidTargets, }, "local_gateway_id": { diff --git a/internal/service/ec2/route_table.go b/internal/service/ec2/route_table.go index fd40abb9f7cb..d479c1a5b724 100644 --- a/internal/service/ec2/route_table.go +++ b/internal/service/ec2/route_table.go @@ -121,8 +121,9 @@ func ResourceRouteTable() *schema.Resource { Optional: true, }, "instance_id": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + Deprecated: "Use network_interface_id instead", }, "local_gateway_id": { Type: schema.TypeString, diff --git a/website/docs/r/route.html.markdown b/website/docs/r/route.html.markdown index 42ca414ded43..12702130c5a1 100644 --- a/website/docs/r/route.html.markdown +++ b/website/docs/r/route.html.markdown @@ -61,7 +61,7 @@ One of the following target arguments must be supplied: * `carrier_gateway_id` - (Optional) Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. * `egress_only_gateway_id` - (Optional) Identifier of a VPC Egress Only Internet Gateway. * `gateway_id` - (Optional) Identifier of a VPC internet gateway or a virtual private gateway. -* `instance_id` - (Optional) Identifier of an EC2 instance. +* `instance_id` - (Optional, **Deprecated** use `network_interface_id` instead) Identifier of an EC2 instance. * `nat_gateway_id` - (Optional) Identifier of a VPC NAT gateway. * `local_gateway_id` - (Optional) Identifier of a Outpost local gateway. * `network_interface_id` - (Optional) Identifier of an EC2 network interface. diff --git a/website/docs/r/route_table.html.markdown b/website/docs/r/route_table.html.markdown index 37779a3df5a8..2ad02c9968eb 100644 --- a/website/docs/r/route_table.html.markdown +++ b/website/docs/r/route_table.html.markdown @@ -90,7 +90,7 @@ One of the following target arguments must be supplied: * `carrier_gateway_id` - (Optional) Identifier of a carrier gateway. This attribute can only be used when the VPC contains a subnet which is associated with a Wavelength Zone. * `egress_only_gateway_id` - (Optional) Identifier of a VPC Egress Only Internet Gateway. * `gateway_id` - (Optional) Identifier of a VPC internet gateway or a virtual private gateway. -* `instance_id` - (Optional) Identifier of an EC2 instance. +* `instance_id` - (Optional, **Deprecated** use `network_interface_id` instead) Identifier of an EC2 instance. * `local_gateway_id` - (Optional) Identifier of a Outpost local gateway. * `nat_gateway_id` - (Optional) Identifier of a VPC NAT gateway. * `network_interface_id` - (Optional) Identifier of an EC2 network interface.