跳至内容

equinix_network_device(资源)

资源 equinix_network_device 允许创建和管理 Equinix Network Edge 虚拟网络设备。

网络边缘虚拟网络设备可以通过两种模式创建:

  • 托管 - (默认)Equinix 管理设备中的连接和服务,客户对设备的访问权限有限。
  • 自主配置 - 客户可在设备中自行配置和管理服务,访问权限限制较少。部分设备类型仅提供此模式。

除了管理模式外,还有两种软件许可模式可供选择:

  • 订阅 - Equinix 提供软件许可,包括端到端支持,并分别收取服务费用。
  • 自带许可证 - [自带许可证] 指客户自带已购买的设备软件许可证。此类许可证不收取任何费用。这是self-configured设备唯一的许可模式。

用法示例

# Create pair of redundant, managed CSR1000V routers with license subscription
# in two different metro locations

data "equinix_network_account" "dc" {
metro_code = "DC"
}

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "csr1000v-ha" {
name = "tf-csr1000v-p"
throughput = 500
throughput_unit = "Mbps"
metro_code = data.equinix_network_account.dc.metro_code
type_code = "CSR1000V"
self_managed = false
connectivity = "INTERNET-ACCESS"
byol = false
package_code = "SEC"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
hostname = "csr1000v-p"
term_length = 12
account_number = data.equinix_network_account.dc.number
version = "16.09.05"
core_count = 2
secondary_device {
name = "tf-csr1000v-s"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "csr1000v-s"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
}
}
# Create self configured PANW cluster with BYOL license

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "panw-cluster" {
name = "tf-panw"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "PA-VM"
self_managed = true
byol = true
package_code = "VM100"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "10.1.3"
interface_count = 10
core_count = 2
ssh_key {
username = "test"
key_name = "test-key"
}
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
cluster_details {
cluster_name = "tf-panw-cluster"
node0 {
vendor_configuration {
hostname = "panw-node0"
}
license_token = "licenseToken"
}
node1 {
vendor_configuration {
hostname = "panw-node1"
}
license_token = "licenseToken"
}
}
}
# Create self configured single Aviatrix device with cloud init file

data "equinix_network_account" "sv" {
metro_code = "SV"
}

variable "filepath" { default = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" }

resource "equinix_network_file" "aviatrix-cloudinit-file" {
file_name = "TF-AVX-cloud-init-file.txt"
content = file("${path.module}/${var.filepath}")
metro_code = data.equinix_network_account.sv.metro_code
device_type_code = "AVIATRIX_EDGE_10"
process_type = "CLOUD_INIT"
self_managed = true
byol = true
}

resource "equinix_network_device" "aviatrix-single" {
name = "tf-aviatrix"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "AVIATRIX_EDGE_10"
self_managed = true
byol = true
package_code = "STD"
notifications = ["john@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "6.9"
core_count = 2
cloud_init_file_id = equinix_network_file.aviatrix-cloudinit-file.uuid
acl_template_id = "c06150ea-b604-4ad1-832a-d63936e9b938"
}
# Create self configured single Catalyst 8000V (Autonomous Mode) router with license token

data "equinix_network_account" "sv" {
name = "account-name"
metro_code = "SV"
}

resource "equinix_network_device" "c8kv-single" {
name = "tf-c8kv"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
notifications = ["test@equinix.com"]
hostname = "C8KV"
account_number = data.equinix_network_account.sv.number
version = "17.06.01a"
core_count = 2
term_length = 12
license_token = "valid-license-token"
additional_bandwidth = 5
ssh_key {
username = "test-username"
key_name = "valid-key-name"
}
acl_template_id = "3e548c02-9164-4197-aa23-05b1f644883c"
}
# Create self configured single VSRX device with BYOL License

data "equinix_network_account" "sv" {
name = "account-name"
metro_code = "SV"
}

resource "equinix_network_device" "vsrx-single" {
name = "tf-c8kv-sdwan"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "VSRX"
self_managed = true
byol = true
package_code = "STD"
notifications = ["test@equinix.com"]
hostname = "VSRX"
account_number = data.equinix_network_account.sv.number
version = "23.2R1.13"
core_count = 2
term_length = 12
additional_bandwidth = 5
project_id = "a86d7112-d740-4758-9c9c-31e66373746b"
diverse_device_id = "ed7891bd-15b4-4f72-ac56-d96cfdacddcc"
ssh_key {
username = "test-username"
key_name = "valid-key-name"
}
acl_template_id = "3e548c02-9164-4197-aa23-05b1f644883c"
}
# Create self configured redundant Arista router with DSA key

data "equinix_network_account" "sv" {
name = "account-name"
metro_code = "SV"
}

resource "equinix_network_ssh_key" "test-public-key" {
name = "key-name"
public_key = "ssh-dss key-value"
type = "DSA"
}

resource "equinix_network_device" "arista-ha" {
name = "tf-arista-p"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "ARISTA-ROUTER"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "CloudEOS"
notifications = ["test@equinix.com"]
hostname = "arista-p"
account_number = data.equinix_network_account.sv.number
version = "4.29.0"
core_count = 4
term_length = 12
additional_bandwidth = 5
ssh_key {
username = "test-username"
key_name = equinix_network_ssh_key.test-public-key.name
}
acl_template_id = "c637a17b-7a6a-4486-924b-30e6c36904b0"
secondary_device {
name = "tf-arista-s"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "arista-s"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
acl_template_id = "fee5e2c0-6198-4ce6-9cbd-bbe6c1dbe138"
}
}
# Create self configured redundant BlueCat DNS and DHCP Server
data "equinix_network_account" "sv" {
name = "account-name"
metro_code = "SV"
}

resource "equinix_network_ssh_key" "test-public-key" {
name = "key-name"
public_key = "ssh-dss key-value"
type = "DSA"
}

resource "equinix_network_device" "bluecat-bdds-ha" {
name = "tf-bluecat-bdds-p"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "BLUECAT"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "STD"
notifications = ["test@equinix.com"]
account_number = data.equinix_network_account.sv.number
version = "9.6.0"
core_count = 2
term_length = 12
vendor_configuration = {
"hostname" = "test"
"privateAddress" : "x.x.x.x"
"privateCidrMask" : "24"
"privateGateway" : "x.x.x.x"
"licenseKey" : "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
"licenseId" : "xxxxxxxxxxxxxxx"
}
ssh_key {
username = "test-username"
key_name = equinix_network_ssh_key.test-public-key.name
}
secondary_device {
name = "tf-bluecat-bdds-s"
metro_code = data.equinix_network_account.sv.metro_code
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = {
"hostname" = "test"
"privateAddress" : "x.x.x.x"
"privateCidrMask" : "24"
"privateGateway" : "x.x.x.x"
"licenseKey" : "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
"licenseId" : "xxxxxxxxxxxxxxx"
}
}
}
# Create self configured redundant BlueCat Edge Service Point
data "equinix_network_account" "sv" {
name = "account-name"
metro_code = "SV"
}

resource "equinix_network_file" "bluecat-edge-service-point-cloudinit-primary-file" {
file_name = "TF-BLUECAT-ESP-cloud-init-file.txt"
content = file("${path.module}/${var.filepath}")
metro_code = data.equinix_network_account.sv.metro_code
device_type_code = "BLUECAT-EDGE-SERVICE-POINT"
process_type = "CLOUD_INIT"
self_managed = true
byol = true
}

resource "equinix_network_file" "bluecat-edge-service-point-cloudinit-secondary-file" {
file_name = "TF-BLUECAT-ESP-cloud-init-file.txt"
content = file("${path.module}/${var.filepath}")
metro_code = data.equinix_network_account.sv.metro_code
device_type_code = "BLUECAT-EDGE-SERVICE-POINT"
process_type = "CLOUD_INIT"
self_managed = true
byol = true
}

resource "equinix_network_device" "bluecat-edge-service-point-ha" {
name = "tf-bluecat-edge-service-point-p"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "BLUECAT-EDGE-SERVICE-POINT"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "STD"
notifications = ["test@equinix.com"]
account_number = data.equinix_network_account.sv.number
cloud_init_file_id = equinix_network_file.bluecat-edge-service-point-cloudinit-primary-file.uuid
version = "4.6.3"
core_count = 4
term_length = 12
secondary_device {
name = "tf-bluecat-edge-service-point-s"
metro_code = data.equinix_network_account.sv.metro_code
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
cloud_init_file_id = equinix_network_file.bluecat-edge-service-point-cloudinit-secondary-file.uuid
}
}
# Create PA-VM firewall cluster with Panorama Server Integration
# with Panorama Server IP and Panorama Auth Key in vendor Configuration

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "panw-cluster" {
name = "tf-panw"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "PA-VM"
self_managed = true
byol = true
package_code = "VM100"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "11.1.3"
interface_count = 10
core_count = 2
ssh_key {
username = "test"
key_name = "test-key"
}
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
cluster_details {
cluster_name = "tf-panw-cluster"
node0 {
vendor_configuration {
hostname = "panw-node0"
panorama_ip_address = "x.x.x.x"
panorama_auth_key = "xxxxxxxxxxx"
}
license_token = "licenseToken"
}
node1 {
vendor_configuration {
hostname = "panw-node1"
panorama_ip_address = "x.x.x.x"
panorama_auth_key = "xxxxxxxxxxx"
}
license_token = "licenseToken"
}
}
}
# Create C8000V BYOL device with bandwidth tier information

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "c8000v-byol-tier" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
}
# Create C8000V BYOL device with numeric bandwidth throughput information

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "c8000v-byol-throughput" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
throughput = "100"
throughput_unit = "Mbps"
ssh_key {
username = "test"
key_name = "test-key"
}
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
}
# Create self configured single Aviatrix Transit Edge device with cloud init file

data "equinix_network_account" "sv" {
metro_code = "SV"
}

variable "filepath" { default = "cloudInitFileFolder/TF-AVX-cloud-init-file.txt" }

resource "equinix_network_file" "aviatrix-cloudinit-file" {
file_name = "TF-AVX-cloud-init-file.txt"
content = file("${path.module}/${var.filepath}")
metro_code = data.equinix_network_account.sv.metro_code
device_type_code = "AVIATRIX_TRANSIT_EDGE"
process_type = "CLOUD_INIT"
self_managed = true
byol = true
}

resource "equinix_network_device" "aviatrix-transit-edge-single" {
name = "tf-aviatrix"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "AVIATRIX_TRANSIT_EDGE"
self_managed = true
byol = true
package_code = "STD"
notifications = ["john@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "7.2.a"
core_count = 2
cloud_init_file_id = equinix_network_file.aviatrix-cloudinit-file.uuid
acl_template_id = "c06150ea-b604-4ad1-832a-d63936e9b938"
}
# Create ZSCALER APPC device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "zscaler-appc-single" {
name = "tf-zscaler-appc"
project_id = "XXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "ZSCALER-APPC"
self_managed = true
byol = true
connectivity = "PRIVATE"
package_code = "STD"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "23.395.1"
interface_count = 1
core_count = 4
vendor_configuration = {"provisioningKey" = "XXXXXXXXXX", "hostname" = "XXXX"}
ssh_key {
username = "test"
key_name = "test-key"
}
}
# Create ZSCALER APPC device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "zscaler-pse-single" {
name = "tf-zscaler-pse"
project_id = "XXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "ZSCALER-PSE"
self_managed = true
byol = true
connectivity = "PRIVATE"
package_code = "STD"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "23.395.1"
interface_count = 1
core_count = 4
vendor_configuration = {"provisioningKey" = "XXXXXXXXXX", "hostname" = "XXXX"}
ssh_key {
username = "test"
key_name = "test-key"
}
}
# Create C8000V BYOL device with bandwidth tier information

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "c8000v-byol-withtout-default-password" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
generate_default_password = false
package_code = "network-essentials"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
}
# Create Checkpoint single device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "CHECKPOINT-SV" {
name = "TF_CHECKPOINT"
project_id = "XXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "CGUARD"
self_managed = true
byol = true
package_code = "STD"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "R81.20"
hostname = "test"
core_count = 2
term_length = 1
additional_bandwidth = 5
acl_template_id = "XXXXXXX"
ssh_key {
username = "XXXXX"
key_name = "XXXXXX"
}
}
# Create Cisco FTD Cluster with Connectivity- PRIVATE

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "Cisco-FTD-SV" {
name = "TF_Cisco_NGFW_CLUSTER_ZNPD"
project_id = "XXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "Cisco_NGFW"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "FTDv10"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "7.0.4-55"
hostname = "test"
core_count = 4
term_length = 1
interface_count = 10
cluster_details {
cluster_name = "tf-ftd-cluster"
node0 {
vendor_configuration {
hostname = "test"
activation_key = "XXXXX"
controller1 = "X.X.X.X"
management_type = "FMC"
}
}
node1 {
vendor_configuration {
hostname = "test"
management_type = "FMC"
}
}
}
}
# Create Fortinet SDWAN single device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "FTNT-SDWAN-SV" {
name = "TF_VERSA-SDWAN"
project_id = "XXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "VERSA_SDWAN"
self_managed = true
byol = true
package_code = "FLEX_VNF_2"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "21.2.3"
core_count = 2
term_length = 1
additional_bandwidth = 50
acl_template_id = "XXXXXXXXX"
vendor_configuration = {
controller1 = "X.X.X.X"
controller2 = "X.X.X.X"
localId = "test@test.com"
remoteId = "test@test.com"
serialNumber = "4"
}
secondary_device {
name = "Praveena_TF_VERSA"
metro_code = data.equinix_network_account.sv.metro_code
account_number = data.equinix_network_account.sv.number
acl_template_id = "XXXXXXXX"
notifications = ["test@eq.com"]
vendor_configuration = {
controller1 = "X.X.X.X"
controller2 = "X.X.X.X"
localId = "test@test.com"
remoteId = "test@test.com"
serialNumber = "4"
}
}
}
# Create VYos Router HA device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "VYOS-AM" {
name = "TF_VYOS"
project_id = "XXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "VYOS-ROUTER"
self_managed = true
byol = false
package_code = "STD"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "1.4.1-2501"
hostname = "test"
core_count = 2
term_length = 1
additional_bandwidth = 50
acl_template_id = "XXXXXXXX"
ssh_key {
username = "test"
key_name = "xxxxxxxx"
}
secondary_device {
name = "TF_CHECKPOINT"
metro_code = data.equinix_network_account.sv.metro_code
account_number = data.equinix_network_account.sv.number
hostname = "test"
acl_template_id = "XXXXXXXXXXX"
notifications = ["test@eq.com"]
}
}
# Create Fortinet SDWAN single device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "FTNT-SDWAN-SV" {
name = "TF_FTNT-SDWAN"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "FG-SDWAN"
self_managed = true
byol = true
package_code = "VM02"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "7.0.14"
hostname = "test"
core_count = 2
term_length = 1
additional_bandwidth = 50
acl_template_id = "XXXXXXXX"
vendor_configuration = {
adminPassword = "XXXXX"
controller1 = "X.X.X.X"
}
}
# Create Aruba Edgeconnect SDWAN HA device

data "equinix_network_account" "sv" {
metro_code = "SV"
}


resource "equinix_network_device" "ARUBA-EDGECONNECT-AM" {
name = "TF_Aruba_Edge_Connect"
project_id = "XXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "EDGECONNECT-SDWAN"
self_managed = true
byol = true
package_code = "EC-V"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "9.4.2.3"
core_count = 2
term_length = 1
additional_bandwidth = 50
interface_count = 32
acl_template_id = "XXXXXXX"
vendor_configuration = {
accountKey : "xxxxx"
accountName : "xxxx"
applianceTag : "tests"
hostname : "test"
}
secondary_device {
name = "TF_CHECKPOINT"
metro_code = data.equinix_network_account.sv.metro_code
account_number = data.equinix_network_account.sv.number
acl_template_id = "XXXXXXX"
notifications = ["test@eq.com"]
vendor_configuration = {
accountKey : "xxxxx"
accountName : "xxxx"
applianceTag : "test"
hostname : "test"
}
}
}
# Create Infoblox Grid Member Single device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "INFOBLOX-SV" {
name = "TF_INFOBLOX"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "INFOBLOX-GRID-MEMBER"
self_managed = true
byol = true
connectivity = "PRIVATE"
package_code = "STD"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "9.0.5"
core_count = 8
term_length = 1
vendor_configuration = {
adminPassword = "xxxxxx"
ipAddress = "X.X.X.X"
subnetMaskIp = "X.X.X.X"
gatewayIp = "X.X.X.X"
}
}
# Create Infoblox Grid Member HA device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "INFOBLOX-SV" {
name = "TF_INFOBLOX"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "INFOBLOX-GRID-MEMBER"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "STD"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "9.0.5"
core_count = 8
term_length = 1
vendor_configuration = {
adminPassword = "X.X.X.X"
ipAddress = "X.X.X.X"
subnetMaskIp = "X.X.X.X"
gatewayIp = "X.X.X.X"
}
secondary_device {
name = "TF_INFOBLOX-Sec"
metro_code = data.equinix_network_account.sv.metro_code
account_number = data.equinix_network_account.sv.number
notifications = ["test@eq.com"]
vendor_configuration = {
adminPassword = "X.X.X.X"
ipAddress = "X.X.X.X"
subnetMaskIp = "X.X.X.X"
gatewayIp = "X.X.X.X"
}
}
}
# Create Infoblox Grid Member HA device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "INFOBLOX-SV" {
name = "TF_INFOBLOX"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "INFOBLOX-GRID-MEMBER"
self_managed = true
byol = true
package_code = "STD"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "9.0.5"
connectivity = "PRIVATE"
core_count = 8
term_length = 1
cluster_details {
cluster_name = "tf-infoblox-cluster"
node0 {
vendor_configuration {
admin_password = "xxxxxxx"
ip_address = "X.X.X.X"
subnet_mask_ip = "X.X.X.X"
gateway_ip = "X.X.X.X"
}
}
node1 {
vendor_configuration {
admin_password = "xxxxxxx"
ip_address = "X.X.X.X"
subnet_mask_ip = "X.X.X.X"
gateway_ip = "X.X.X.X"
}
}
}
}
# Create F5XC device

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "f5xc-single" {
name = "tf-f5xc"
project_id = "XXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "F5XC"
self_managed = true
byol = true
connectivity = "INTERNET-ACCESS"
package_code = "STD"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 1
account_number = data.equinix_network_account.sv.number
acl_template_id = "xxxx"
version = "9.2025.17"
interface_count = 8
core_count = 8
vendor_configuration = {"token" = "XXXXXXXXXX", "hostname" = "XXXX"}
}
# Create C8000V HA - BYOL device with cloud init rest api support

data "equinix_network_account" "sv" {
metro_code = "SV"
}

resource "equinix_network_device" "c8000v-byol" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
generate_default_password = true
package_code = "network-essentials"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
vendor_configuration = { restApiSupportRequirement = "true" }
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
secondary_device {
name = "tf-c8000v-byol-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "csr1000v-s"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = { restApiSupportRequirement = "true" }
acl_template_id = "0bff6e05-f0e7-44cd-804a-25b92b835f8b"
}
}
# Create Aruba Edgeconnect SDWAN HA device with 2different account numbers with purchase orders

data "equinix_network_account" "sv" {
metro_code = "SV"
}


resource "equinix_network_device" "ARUBA-EDGECONNECT-AM" {
name = "TF_Aruba_Edge_Connect"
project_id = "XXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "EDGECONNECT-SDWAN"
self_managed = true
byol = true
package_code = "EC-V"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "9.4.2.3"
core_count = 2
term_length = 1
additional_bandwidth = 50
interface_count = 32
acl_template_id = "XXXXXXX"
purchase_order_number = "PO-Primary-Account-123"
vendor_configuration = {
accountKey : "xxxxx"
accountName : "xxxx"
applianceTag : "tests"
hostname : "test"
}
secondary_device {
name = "TF_CHECKPOINT"
metro_code = data.equinix_network_account.sv.metro_code
account_number = data.equinix_network_account.sv.number
purchase_order_number = "PO-Secondary-Account-123"
acl_template_id = "XXXXXXX"
notifications = ["test@eq.com"]
vendor_configuration = {
accountKey : "xxxxx"
accountName : "xxxx"
applianceTag : "test"
hostname : "test"
}
}
}
# Create C8000V HA - BYOL device with connectivity PRIVATE with DHCP IP address type

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "c8000v-byol" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
connectivity = "PRIVATE"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
vendor_configuration = { restApiSupportRequirement = "true", ipAddressType = "DHCP", managementInterfaceId= "6" }
secondary_device {
name = "tf-c8000v-byol-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "c8000v-s"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = { restApiSupportRequirement = "true", ipAddressType = "DHCP", managementInterfaceId= "6" }
}
}
# Create C8000V HA - BYOL device with connectivity PRIVATE with NO IP address type

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "c8000v-byol" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
connectivity = "PRIVATE"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
vendor_configuration = { restApiSupportRequirement = "true", ipAddressType = "NO_IP_ADDRESS" }
secondary_device {
name = "tf-c8000v-byol-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "csr8000v-s"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = { restApiSupportRequirement = "true", ipAddressType = "NO_IP_ADDRESS" }
}
}
# Create C8000V HA - BYOL device with connectivity PRIVATE with static IP address type

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "c8000v-byol" {
name = "tf-c8000v-byol"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "C8000V"
self_managed = true
byol = true
package_code = "network-essentials"
connectivity = "PRIVATE"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = data.equinix_network_account.sv.number
version = "17.11.01a"
interface_count = 10
core_count = 2
tier = 1
ssh_key {
username = "test"
key_name = "test-key"
}
vendor_configuration = {
restApiSupportRequirement = "true", ipAddressType = "STATIC", ipAddress = "x.x.x.x", gatewayIp = "x.x.x.x",
subnetMaskIp = "x.x.x.x", managementInterfaceId= "6"
}
secondary_device {
name = "tf-c8000v-byol-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "csr8000v-s"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = {
restApiSupportRequirement = "true", ipAddressType = "STATIC", ipAddress = "x.x.x.x", gatewayIp = "x.x.x.x",
subnetMaskIp = "x.x.x.x", managementInterfaceId= "6"
}
}
}
# Create FG VM Cluster with connectivity PRIVATE and IP Address Type as STATIC

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "FGVM-SV" {
name = "tf-fgvm-cluster-static-znpd"
metro_code = "DC"
type_code = "FG-VM"
project_id = "xxxxxxx"
self_managed = true
connectivity = "PRIVATE"
byol = true
package_code = "VM02"
notifications = ["john@equinix.com", "marry@equinix.com", "fred@equinix.com"]
term_length = 12
account_number = xxxxxx
version = "7.6.2"
interface_count = 10
core_count = 2
ssh_key {
username = "sanity1"
key_name = ""
}
cluster_details {
cluster_name = "tf-fgvm--cluster"
node0 {
vendor_configuration {
ip_address = "x.x.x.x"
subnet_mask_ip = "x.x.x.x"
gateway_ip = "x.x.x.x"
management_interface_id = "5"
hostname = "test"
ip_address_type = "STATIC"
}
}
node1 {
vendor_configuration {
ip_address = "x.x.x.x"
subnet_mask_ip = "x.x.x.x"
gateway_ip = "x.x.x.x"
management_interface_id = "5"
hostname = "test"
ip_address_type = "STATIC"
}
}
}
}
# Create Fortinet VM firewall ha device with connectivity PRIVATE and IP Address Type as DHCP

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "FTNT-FIREWALL-SV" {
name = "TF_FTNT-FIREWALL"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "FG-VM"
self_managed = true
byol = true
interface_count = 10
connectivity = "PRIVATE"
package_code = "VM02"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "7.6.3"
hostname = "test"
core_count = 2
term_length = 1
vendor_configuration = {
ipAddressType = "DHCP", managementInterfaceId= "6"
}
secondary_device {
name = "TF_FTNT-FIREWALL-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "fg-vm-znpd"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = { ipAddressType = "DHCP", managementInterfaceId= "6"}
}
}
# Create Fortinet firewall ha device with connectivity PRIVATE and IP Address Type as NO IP Address

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "FTNT-FIREWALL-SV" {
name = "TF_FTNT-FIREWALL"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
type_code = "FG-VM"
interface_count = 10
self_managed = true
byol = true
connectivity = "PRIVATE"
package_code = "VM02"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "7.6.3"
hostname = "test"
core_count = 2
term_length = 1
vendor_configuration = {
ipAddressType = "NO_IP_ADDRESS"
}
secondary_device {
name = "TF_FTNT-FIREWALL-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "fg-vm-znpd"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = {
ipAddressType = "NO_IP_ADDRESS"
}
}
}
# Create FG VM ha device with connectivity PRIVATE and IP Address Type as STATIC

data "equinix_network_account" "sv" {
metro_code = "SV"
name = "account-name"
}

resource "equinix_network_device" "FTNT-FIREWALL-SV" {
name = "TF_FTNT-FIREWALL"
project_id = "XXXXXXXXXX"
metro_code = data.equinix_network_account.sv.metro_code
interface_count = 10
type_code = "FG-VM"
self_managed = true
byol = true
connectivity = "PRIVATE"
package_code = "VM02"
notifications = ["test@eq.com"]
account_number = data.equinix_network_account.sv.number
version = "7.6.3"
hostname = "test"
core_count = 2
term_length = 1
vendor_configuration = {
gatewayIp = "X.X.X.X"
ipAddress = "X.X.X.X"
ipAddressType = "STATIC"
subnetMaskIp = "x.x.x.x"
managementInterfaceId = "6"
}
secondary_device {
name = "TF_FTNT-FIREWALL-secondary"
metro_code = data.equinix_network_account.sv.metro_code
hostname = "fg-vm-znpd"
notifications = ["john@equinix.com", "marry@equinix.com"]
account_number = data.equinix_network_account.sv.number
vendor_configuration = {
gatewayIp = "X.X.X.X"
ipAddress = "X.X.X.X"
ipAddressType = "STATIC"
subnetMaskIp = "X.X.X.X"
managementInterfaceId = "6"
}
}
}

论证参考

以下论点得到支持:

  • name - (必填)设备名称。
  • type_code - (必填)设备类型代码。
  • metro_code - (必填)设备所在都市代码。
  • hostname - (可选)设备主机名前缀。
  • package_code - (必需)设备软件包代码。
  • version - (必填)设备软件版本。
  • core_count - (必填)设备使用的 CPU 核心数。(注意:使用此字段调整设备大小。调整 HA 设备大小时,主设备将首先升级。如果升级失败,设备将自动回滚到之前的状态,并恢复到原始核心数。
  • tier - (可选,与 throughputthroughput_unit 冲突)选择您许可证的带宽等级,例如 0123。等级仅适用于 C8000V 自主型或 C8000V SD-WAN(控制器)设备类型。如果未提供,则等级默认为“2”。
  • term_length - (必填)设备终端长度。
  • self_managed - (可选)布尔值,用于确定设备管理模式,即 self-managedEquinix-managed(默认值)。
  • byol - (可选)布尔值,用于确定设备许可模式,即 bring your own licensesubscription(默认值)。
  • license_token - (可选,与 license_file 冲突)适用于 BYOL 许可模式下某些设备类型的许可证令牌。
  • license_file - (可选)许可证文件的路径,该文件将上传并应用于设备。适用于采用自带许可证 (BYOL) 许可模式的某些设备类型。
  • license_file_id - (可选,与 license_file 冲突)将应用于设备的许可证文件的标识符。
  • cloud_init_file_id - (可选)将在设备上应用的云初始化文件的标识符。
  • throughput - (可选)设备许可证吞吐量。
  • throughput_unit - (可选)许可证吞吐量单位。取值为 MbpsGbps
  • account_number - (必填)设备的计费账号。
  • notifications - (必填)接收设备状态通知的电子邮件地址列表。
  • purchase_order_number - (可选)与设备订单关联的采购订单号。对于需要采购订单的结算账户,此字段为必填项。
  • order_reference - (可选)用于在发票上识别设备订单的名称/编号。
  • acl_template_id - (可选)要应用于设备的 WAN 接口 ACL 模板的标识符。
  • mgmt_acl_template_uuid - (可选)将应用于设备的 MGMT 接口 ACL 模板的标识符。
  • additional_bandwidth - (可选)分配给设备的额外互联网带宽,以 Mbps 为单位(除了默认的 15Mbps 之外)。
  • interface_count - (可选)设备上的网络接口数量。如果未指定,则将使用给定设备类型的默认数量。
  • wan_interafce_id - (可选)指定 WAN/SSH 接口 ID。如果未指定,则将使用给定设备类型的默认 WAN/SSH 接口。
  • vendor_configuration - (可选)设备厂商特定配置参数映射(controller1、activationKey、managementType、siteId、systemIpAddress、privateAddress、privateCidrMask、privateGateway、licenseKey、licenseId、panoramaAuthKey、panoramaIpAddress、provisioningKey、ipAddress(仅适用于 infoblox)、subnetMaskIp(仅适用于 infoblox)、gatewayIp(仅适用于 infoblox))
  • ssh-key - (可选)定义将在设备上配置的 SSH 密钥(最多一个密钥)。有关更多详细信息,请参阅下面的 SSH 密钥
  • secondary_device - (可选)冗余设备配置的辅助设备定义。有关更多详细信息,请参阅下面的辅助设备
  • cluster_details - (可选)包含集群详细信息的对象。有关更多详细信息,请参阅下面的集群详细信息
  • connectivity - (可选)设备访问权限(INTERNET-ACCESS、PRIVATE 或 INTERNET-ACCESS-WITH-PRVT-MGMT)。如果未指定,则默认值为 INTERNET-ACCESS。
  • project_id - (可选)设备所属项目资源的唯一标识符。如果省略,则设备将以您组织的默认项目 ID 创建。
  • diverse_device_id - (可选)现有设备的唯一 ID。如果您希望新设备与任何现有虚拟设备位于不同的位置,请使用此字段告知 Equinix。此字段仅对单个设备有意义。
  • generate_default_password - (可选)布尔值,用于确定是否使用默认密码创建设备。使用此字段告知 Equinix 您是否希望使用默认管理员密码创建新设备。 此字段仅对 C8000V 自主型(单机/高可用性)和 Fortinet 防火墙设备(单机/高可用性/集群)有效。如果未指定,则默认情况下会使用管理员密码创建设备。

辅助设备

-> 注意: Network Edge 提供不同的高可用性 (HA) 选项。通过定义 secondary_device 块,Terraform 将部署冗余设备,这对于需要在独立硬件堆栈上部署两个主动转发数据平面(双活)的客户非常有用。请参阅弹性架构文档,了解更多关于可实现的容错解决方案的信息。

secondary_device 代码块支持以下参数:

  • name - (必填)辅助设备名称。
  • metro_code - (必填)辅助设备的 Metro 位置。
  • hostname - (可选)辅助设备主机名。
  • license_token - (可选,与 license_file 冲突)可以为某些设备类型提供许可证令牌。
  • license_file - (可选)许可证文件的路径,该文件将上传并应用于辅助设备。适用于采用 BYOL 许可模式的某些设备类型。
  • license_file_id - (可选,与 license_file 冲突)将在辅助设备上应用的许可证文件的标识符。
  • cloud_init_file_id - (可选)将在辅助设备上应用的云初始化文件的标识符。
  • account_number - (必填)辅助设备的计费账号。
  • notifications - (必填)接收有关辅助设备通知的电子邮件地址列表。
  • additional_bandwidth - (可选)辅助设备所需的额外互联网带宽,以 Mbps 为单位。
  • vendor_configuration - (可选)辅助设备的厂商特定配置参数的键/值对。键值为 controller1activationKeymanagementTypesiteIdsystemIpAddressprivateAddressprivateCidrMaskprivateGatewaylicenseKeylicenseIdpanoramaAuthKeypanoramaIpAddressipAddresssubnetMaskIpgatewayIp
  • acl_template_id - (可选)将应用于辅助设备的 WAN 接口 ACL 模板的标识符。
  • mgmt_acl_template_uuid - (可选)将在辅助设备上应用的 MGMT 接口 ACL 模板的标识符。
  • ssh-key - (可选)最多一个将在辅助设备上配置的 SSH 密钥定义。

SSH密钥

ssh_key 代码块支持以下参数:

  • username - (必填)与给定密钥关联的用户名。
  • name - (可选)按名称引用先前配置的公共 SSH 密钥。

集群详情

-> 注意: Network Edge 提供不同的高可用性 (HA) 选项。通过定义 cluster_details 代码块,Terraform 将部署 Device Clustering。此选项基于供应商特定的功能,允许客户部署比 secondary_device 更高级的弹性配置。请参阅 Network Edge HA 选项 文档,了解哪些供应商支持集群设备。请参阅 弹性架构 文档,了解更多可实现的容错解决方案。

cluster_details 代码块支持以下参数:

  • cluster_name - (必填)集群设备的名称
  • node0 - (必填)具有 node0 配置的对象。有关更多详细信息,请参阅下面的集群详细信息 - 节点
  • node1 - (必填)具有 node1 配置的对象。有关更多详细信息,请参阅下面的集群详细信息 - 节点

集群详情 - 节点

node0node1 块支持以下参数:

  • vendor_configuration - (可选)包含与集群设备供应商相关的字段的对象。有关更多详细信息,请参阅下面的集群详细信息 - 节点 - 供应商配置
  • license_file_id - (可选)许可证文件 ID。Fortinet 和 Juniper 集群需要此信息。
  • license_token - (可选)许可证令牌。Palo Alto 集群需要此令牌。

集群详情 - 节点 - 供应商配置

vendor_configuration 代码块支持以下参数:

  • hostname - (可选)主机名。Palo Alto、Juniper 和 Fortinet 集群需要此项。
  • admin_password - (可选)设备的管理员密码。您可以使用此密码登录控制台。并非所有设备类型都提供此字段。
  • controller1 - (可选)系统 IP 地址。Fortinet SDWAN 集群设备必须填写此项。
  • activation_key - (可选)激活密钥。Velocloud 集群需要此密钥。
  • controller_fqdn - (可选)控制器 FQDN。Velocloud 集群需要此项。
  • root_password - (可选)设备的 CLI 密码。此字段仅适用于 Velocloud SDWAN 集群。
  • panorama_ip_address - (可选)Panorama 服务器 IP 地址。此字段仅当 PA-VM 防火墙设备需要与 Panorama 服务器集成时才相关。
  • panorama_auth_key - (可选)Panorama 服务器身份验证密钥。此字段仅适用于需要与 Panorama 服务器集成的 PA-VM 防火墙设备。
  • provisioning_key - (可选)配置密钥。此字段仅适用于 ZSCALER APPC 和 ZSCALER PSE 设备。
  • ip_address - (可选)IP 地址。此字段仅适用于 Infoblox 设备。
  • subnet_mask_ip - (可选)子网掩码 IP。此字段仅适用于 Infoblox 设备。
  • gateway_ip - (可选)网关 IP 地址。此字段仅适用于 Infoblox 设备。

属性参考

除了上述所有参数外,还会导出以下属性:

  • uuid - 设备唯一标识符。
  • status - 设备配置状态。可能的值有 INITIALIZINGPROVISIONINGWAITING_FOR_PRIMARYWAITING_FOR_SECONDARYWAITING_FOR_REPLICA_CLUSTER_NODESCLUSTER_SETUP_IN_PROGRESSFAILEDPROVISIONEDDEPROVISIONINGDEPROVISIONEDRESOURCE_UPGRADE_IN_PROGRESSRESOURCE_UPGRADE_FAILED
  • license_status - 设备许可证注册状态。可能的值为 APPLYING_LICENSEREGISTEREDAPPLIEDWAITING_FOR_CLUSTER_SETUPREGISTRATION_FAILED
  • license_file_id - 已应用许可证文件的唯一标识符。
  • ibx - 设备位置 Equinix Business Exchange 名称。
  • region - 设备位置区域。
  • acl_template_id - 应用的 ACL 模板的唯一标识符。
  • ssh_ip_address - 设备上启用 SSH 的接口的 IP 地址。
  • ssh_ip_fqdn - 设备上启用 SSH 的接口的 FQDN。
  • redundancy_type - 适用于 HA 设备的设备冗余类型,可以是主设备或辅助设备。
  • redundant_id - 适用于 HA 设备的冗余设备的唯一标识符。
  • interface - 设备接口列表。更多详情请参见下方的接口属性
  • asn - (自治系统编号)互联网上网络的唯一标识符。
  • zone_code - 设备位置区域代码。
  • cluster_id - 集群的 ID。
  • num_of_nodes - 集群中的节点数。
  • diverse_device_name - 具有不同设备 UUID 的设备的名称。如果设备是通过传递 diverse_device_id 创建的,则此字段将在设备详细信息中返回。

接口属性

每个接口属性都包含以下字段:

  • id - 接口标识符。
  • name - 接口名称。
  • status - 接口状态。取值范围为 AVAILABLERESERVEDASSIGNED 之一。
  • operational_status - 接口运行状态。取值范围为 updown
  • mac_address - 接口 MAC 地址。
  • ip_address - 接口 IP 地址。
  • assigned_type - 接口管理类型(Equinix 管理或空)。
  • type - 接口类型。

暂停

此资源提供以下超时配置选项:

  • 创建 - 默认值为 90 分钟
  • 更新 - 默认值为 90 分钟
  • 删除 - 默认值为 30 分钟

进口

可以使用现有 ID 导入此资源:

terraform import equinix_network_device.example {existing_id}

无法导入 license_tokenmgmt_acl_template_uuidcloud_init_file_id 字段。

此页面有帮助吗?