» baiducloud_route_rule

Provides a resource to create a VPC routing rule.

» Example Usage

resource "baiducloud_route_rule" "default" {
  route_table_id = "rt-as4npcsp2hve"
  source_address = ""
  destination_address = ""
  next_hop_id = "i-BtXnDM6y"
  next_hop_type = "custom"
  description = "baiducloud route rule created by terraform"

» Argument Reference

The following arguments are supported:

  • destination_address - (Required, ForceNew) Destination CIDR block of the routing rule. The network segment can be, otherwise, the destination address cannot overlap with this VPC CIDR block(except when the destination network segment or the VPC CIDR is
  • next_hop_type - (Required, ForceNew) Type of the next hop, available values are custom、vpn and nat.
  • route_table_id - (Required, ForceNew) ID of the routing table.
  • source_address - (Required, ForceNew) Source CIDR block of the routing rule. The value can be all network segments, existing subnet segments in the VPC, or the network segment within the subnet.
  • description - (Optional, ForceNew) Description of the routing rule.
  • next_hop_id - (Optional, ForceNew) ID of the next hop.