Add context support to vlan-attachments (#3787)
This commit is contained in:
35
tests/modules/net-vlan-attachment/context.tfvars
Normal file
35
tests/modules/net-vlan-attachment/context.tfvars
Normal file
@@ -0,0 +1,35 @@
|
||||
context = {
|
||||
locations = {
|
||||
my_region = "europe-west1"
|
||||
}
|
||||
networks = {
|
||||
my_network = "projects/my-project/global/networks/my-network"
|
||||
}
|
||||
project_ids = {
|
||||
my_project = "my-project"
|
||||
}
|
||||
routers = {
|
||||
my_router = "my-router"
|
||||
}
|
||||
}
|
||||
|
||||
dedicated_interconnect_config = {
|
||||
bandwidth = "BPS_100G"
|
||||
bgp_range = "169.254.1.0/29"
|
||||
bgp_priority = 100
|
||||
interconnect = "projects/my-project/global/interconnects/my-interconnect"
|
||||
vlan_tag = 100
|
||||
}
|
||||
|
||||
description = "test attachment"
|
||||
name = "test-attachment"
|
||||
peer_asn = "65534"
|
||||
|
||||
network = "$networks:my_network"
|
||||
project_id = "$project_ids:my_project"
|
||||
region = "$locations:my_region"
|
||||
|
||||
router_config = {
|
||||
create = false
|
||||
name = "$routers:my_router"
|
||||
}
|
||||
85
tests/modules/net-vlan-attachment/context.yaml
Normal file
85
tests/modules/net-vlan-attachment/context.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
values:
|
||||
google_compute_interconnect_attachment.default:
|
||||
admin_enabled: true
|
||||
bandwidth: BPS_100G
|
||||
candidate_cloud_router_ip_address: null
|
||||
candidate_cloud_router_ipv6_address: null
|
||||
candidate_customer_router_ip_address: null
|
||||
candidate_customer_router_ipv6_address: null
|
||||
candidate_subnets:
|
||||
- 169.254.1.0/29
|
||||
description: test attachment
|
||||
effective_labels:
|
||||
goog-terraform-provisioned: 'true'
|
||||
encryption: NONE
|
||||
interconnect: projects/my-project/global/interconnects/my-interconnect
|
||||
ipsec_internal_addresses: null
|
||||
l2_forwarding: []
|
||||
labels: null
|
||||
mtu: '1500'
|
||||
name: test-attachment
|
||||
project: my-project
|
||||
region: europe-west1
|
||||
router: my-router
|
||||
subnet_length: null
|
||||
terraform_labels:
|
||||
goog-terraform-provisioned: 'true'
|
||||
timeouts: null
|
||||
type: DEDICATED
|
||||
vlan_tag8021q: 100
|
||||
google_compute_router_interface.default[0]:
|
||||
name: test-attachment-intf
|
||||
private_ip_address: null
|
||||
project: my-project
|
||||
region: europe-west1
|
||||
router: my-router
|
||||
subnetwork: null
|
||||
timeouts: null
|
||||
vpn_tunnel: null
|
||||
google_compute_router_peer.default[0]:
|
||||
advertise_mode: CUSTOM
|
||||
advertised_groups: null
|
||||
advertised_ip_ranges: []
|
||||
advertised_route_priority: 100
|
||||
custom_learned_ip_ranges: []
|
||||
custom_learned_route_priority: null
|
||||
enable: true
|
||||
enable_ipv6: false
|
||||
export_policies: null
|
||||
import_policies: null
|
||||
interface: test-attachment-intf
|
||||
md5_authentication_key: []
|
||||
name: test-attachment-peer
|
||||
peer_asn: 65534
|
||||
project: my-project
|
||||
region: europe-west1
|
||||
router: my-router
|
||||
router_appliance_instance: null
|
||||
timeouts: null
|
||||
zero_advertised_route_priority: null
|
||||
zero_custom_learned_route_priority: false
|
||||
random_id.secret:
|
||||
byte_length: 12
|
||||
keepers: null
|
||||
prefix: null
|
||||
|
||||
counts:
|
||||
google_compute_interconnect_attachment: 1
|
||||
google_compute_router_interface: 1
|
||||
google_compute_router_peer: 1
|
||||
modules: 0
|
||||
random_id: 1
|
||||
17
tests/modules/net-vlan-attachment/tftest.yaml
Normal file
17
tests/modules/net-vlan-attachment/tftest.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
module: modules/net-vlan-attachment
|
||||
tests:
|
||||
context:
|
||||
Reference in New Issue
Block a user