Skip to content

Commit

Permalink
Merge pull request #22664 from hashicorp/f-deprecate-route-route-tabl…
Browse files Browse the repository at this point in the history
…e-instance-id

r/route and r/route_table: deprecate `instance_id`
  • Loading branch information
anGie44 authored Jan 19, 2022
2 parents 6a605b2 + c259cf8 commit 20ce01f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changelog/22664.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:note
resource/aws_route: The `instance_id` argument has been deprecated. All configurations using `instance_id` should be updated to use the `network_interface_id` argument instead
```

```release-note:note
resource/aws_route_table: The `instance_id` argument of the `route` configuration block has been deprecated. All configurations using `route` `instance_id` should be updated to use the `route` `network_interface_id` argument instead
```
1 change: 1 addition & 0 deletions internal/service/ec2/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 3 additions & 2 deletions internal/service/ec2/route_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/route.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/route_table.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 20ce01f

Please sign in to comment.