Allow using gVNIC in compute-vm (#211)

This commit is contained in:
Andras Gyomrey
2021-07-25 15:17:45 +00:00
parent 0e0724b833
commit d2ef4c3277
21 changed files with 97 additions and 53 deletions

View File

@@ -78,17 +78,23 @@ variable "network_interfaces" {
internal = string
external = string
})
alias_ips = map(string)
}))
default = [{
network = "https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default",
subnetwork = "https://www.googleapis.com/compute/v1/projects/my-project/regions/europe-west1/subnetworks/default-default",
nat = false,
addresses = null
alias_ips = null
}]
}
variable "network_interface_options" {
type = map(object({
alias_ips = map(string)
nic_type = string
}))
default = {}
}
variable "service_account_create" {
type = bool
default = false

View File

@@ -26,7 +26,6 @@ def test_address(plan_runner):
subnetwork = "https://www.googleapis.com/compute/v1/projects/my-project/regions/europe-west1/subnetworks/default-default",
nat = false,
addresses = {external=null, internal="10.0.0.2"}
alias_ips = null
}]
'''
_, resources = plan_runner(FIXTURES_DIR, network_interfaces=nics)
@@ -42,7 +41,6 @@ def test_nat_address(plan_runner):
subnetwork = "https://www.googleapis.com/compute/v1/projects/my-project/regions/europe-west1/subnetworks/default-default",
nat = true,
addresses = {external="8.8.8.8", internal=null}
alias_ips = null
}]
'''
_, resources = plan_runner(FIXTURES_DIR, network_interfaces=nics)