Google compute engine 如何使用terraform将多个外部IP分配给google云实例

Google compute engine 如何使用terraform将多个外部IP分配给google云实例,google-compute-engine,terraform,Google Compute Engine,Terraform,我能够通过以下代码向实例添加外部IP network_interface { subnetwork = "${europe-staging-subnetwork.self_link}" access_config { nat_ip = "${google_compute_address.external_ip.address}" } } resource "google_compute_network" "staging-network" { name

我能够通过以下代码向实例添加外部IP

network_interface {
subnetwork = "${europe-staging-subnetwork.self_link}"


access_config {
  nat_ip = "${google_compute_address.external_ip.address}"
}
}

resource "google_compute_network" "staging-network" {
name                    = "staging-network"
auto_create_subnetworks = "false"
}
resource "google_compute_subnetwork" "europe-staging-subnetwork" {
name          = "europe-staging-subnetwork"
region        = "europe-west1"
ip_cidr_range = "#.#.#.#/16"
network       = "${google_compute_network.staging-network.self_link}"
}
但是如何将多个外部IP分配给一个实例?

您可以使用多个外部IP。需要在创建实例时配置网络接口,并在创建实例后配置这些接口