Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform support for best path selection #11825

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions mmv1/products/compute/Network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@ examples:
network_name: 'vpc-network'
test_env_vars:
project: 'PROJECT_NAME'
- name: 'network_bgp_best_path_selection_mode'
primary_resource_id: 'vpc_network'
min_version: 'beta'
vars:
network_name: 'vpc-network'
test_env_vars:
project: 'PROJECT_NAME'
- name: 'network_bgp_best_path_selection_mode_standard'
primary_resource_id: 'vpc_network'
min_version: 'beta'
vars:
network_name: 'vpc-network'
test_env_vars:
project: 'PROJECT_NAME'
- name: 'network_bgp_best_path_selection_mode_standard_custom_fields'
primary_resource_id: 'vpc_network'
min_version: 'beta'
vars:
network_name: 'vpc-network'
test_env_vars:
project: 'PROJECT_NAME'
virtual_fields:
- name: 'delete_default_routes_on_create'
description: |
Expand Down Expand Up @@ -144,6 +165,39 @@ properties:
enum_values:
- 'REGIONAL'
- 'GLOBAL'
- name: 'bgpBestPathSelectionMode'
type: Enum
description: |
The BGP best selection algorithm to be employed. MODE can be LEGACY or STANDARD.
min_version: 'beta'
default_from_api: true
update_url: 'projects/{{project}}/global/networks/{{name}}'
update_verb: 'PATCH'
enum_values:
- 'LEGACY'
- 'STANDARD'
- name: 'bgpAlwaysCompareMed'
type: Boolean
description: |
Enables/disables the comparison of MED across routes with different Neighbor ASNs.
This value can only be set if the --bgp-best-path-selection-mode is STANDARD
min_version: 'beta'
required: false
default_from_api: true
update_url: 'projects/{{project}}/global/networks/{{name}}'
update_verb: 'PATCH'
- name: 'bgpInterRegionCost'
type: Enum
description: |
Choice of the behavior of inter-regional cost and MED in the BPS algorithm.
min_version: 'beta'
required: false
default_from_api: true
update_url: 'projects/{{project}}/global/networks/{{name}}'
update_verb: 'PATCH'
enum_values:
- 'DEFAULT'
- 'ADD_COST_TO_MED'
- name: 'mtu'
type: Integer
description: |
Expand Down
18 changes: 18 additions & 0 deletions mmv1/products/compute/Route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,24 @@ properties:
description: |
URL to a Network that should handle matching packets.
output: true
- name: 'nextHopOrigin'
type: String
description: |
Indicates the origin of the route. Can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE.
min_version: 'beta'
output: true
- name: 'nextHopMed'
type: String
description: |
Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network.
min_version: 'beta'
output: true
- name: 'nextHopInterRegionCost'
type: String
description: |
Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions.
min_version: 'beta'
output: true
- name: 'nextHopIlb'
type: String
description: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "google_compute_network" "{{$.PrimaryResourceId}}" {
provider = google-beta
project = "{{index $.TestEnvVars "project"}}"
name = "{{index $.Vars "network_name"}}"
routing_mode = "GLOBAL"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "google_compute_network" "{{$.PrimaryResourceId}}" {
provider = google-beta
project = "{{index $.TestEnvVars "project"}}"
name = "{{index $.Vars "network_name"}}"
routing_mode = "GLOBAL"
bgp_best_path_selection_mode = "STANDARD"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resource "google_compute_network" "{{$.PrimaryResourceId}}" {
provider = google-beta
project = "{{index $.TestEnvVars "project"}}"
name = "{{index $.Vars "network_name"}}"
routing_mode = "GLOBAL"
bgp_best_path_selection_mode = "STANDARD"
bgp_always_compare_med = true
bgp_inter_region_cost = "ADD_COST_TO_MED"
}
Loading
Loading