Skip to content

Commit

Permalink
r/route and r/route_table: deprecate 'instance_id'
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Jan 19, 2022
1 parent 6a605b2 commit 7e3bde9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
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 7e3bde9

Please sign in to comment.