2021-06-16 04:56:40 -07:00
/ * *
2022-01-01 06:52:31 -08:00
* Copyright 2022 Google LLC
2021-06-16 04:56:40 -07:00
*
* Licensed under the Apache License , Version 2 . 0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* http : //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing , software
* distributed under the License is distributed on an " AS IS " BASIS ,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied .
* See the License for the specific language governing permissions and
* limitations under the License .
* /
variable " bgp " {
2022-01-31 01:45:34 -08:00
description = " Bgp session parameters. "
2021-06-16 04:56:40 -07:00
type = object ( {
session_range = string
candidate_ip_ranges = list ( string )
advertised_route_priority = number
} )
default = null
}
variable " config " {
2022-01-31 01:45:34 -08:00
description = " VLAN attachment parameters: description, vlan_id, bandwidth, admin_enabled, interconnect. "
2021-06-16 04:56:40 -07:00
type = object ( {
description = string
vlan_id = number
bandwidth = string
admin_enabled = bool
mtu = number
} )
default = {
description = null
vlan_id = null
bandwidth = " BPS_10G "
admin_enabled = true
mtu = 1440
}
}
variable " interconnect " {
description = " URL of the underlying Interconnect object that this attachment's traffic will traverse through. "
type = string
}
variable " name " {
2022-01-31 01:45:34 -08:00
description = " The name of the vlan attachment. "
2021-06-16 04:56:40 -07:00
type = string
default = " vlan-attachment "
}
variable " peer " {
2022-01-31 01:45:34 -08:00
description = " Peer Ip address and asn. Only IPv4 supported. "
2021-06-16 04:56:40 -07:00
type = object ( {
ip_address = string
asn = number
} )
}
variable " project_id " {
2022-01-31 01:45:34 -08:00
description = " The project containing the resources. "
2021-06-16 04:56:40 -07:00
type = string
}
variable " region " {
2022-01-31 01:45:34 -08:00
description = " Region where the router resides. "
2021-06-16 04:56:40 -07:00
type = string
default = " europe-west1-b "
}
variable " router_config " {
2022-01-31 01:45:34 -08:00
description = " Router asn and custom advertisement configuration, ip_ranges is a map of address ranges and descriptions.. . "
2021-06-16 04:56:40 -07:00
type = object ( {
description = string
asn = number
advertise_config = object ( {
groups = list ( string )
ip_ranges = map ( string )
mode = string
} )
} )
default = {
description = null
asn = 64514
advertise_config = null
}
}
variable " router_create " {
description = " Create router. "
type = bool
default = true
}
variable " router_name " {
description = " Router name used for auto created router, or to specify an existing router to use if `router_create` is set to `true`. Leave blank to use vlan attachment name for auto created router. "
type = string
default = " router-vlan-attachment "
}
variable " router_network " {
2022-01-31 01:45:34 -08:00
description = " A reference to the network to which this router belongs. "
2021-06-16 04:56:40 -07:00
type = string
default = null
}