resource "ionoscloud_server" "example2" {
name = "server2"
datacenter_id = "${ionoscloud_datacenter.example.id}"
cores = 1
ram = 1024
availability_zone = "ZONE_1"
image_password = "test1234"
ssh_key_path = ["id_rsa.pub"]
image_name = "ubuntu:latest"
volume {
name = "new"
size = 5
disk_type = "SSD"
}
nic {
lan = "${ionoscloud_lan.example.id}"
dhcp = true
// ip = "${ionoscloud_ipblock.example.ips[1]}"
ip = ["${ionoscloud_ipblock.example.ips[1]}","${ionoscloud_ipblock.example.ips[0]}"]
firewall_active = false
}
}
Error and Debug Output
Error: Incorrect attribute value type
│
│ on main.tf line 76, in resource "ionoscloud_server" "example2":
│ 76: ip = ["${ionoscloud_ipblock.example.ips[1]}","${ionoscloud_ipblock.example.ips[0]}"]
│ ├────────────────
│ │ ionoscloud_ipblock.example.ips[0] will be known only after apply
│ │ ionoscloud_ipblock.example.ips[1] will be known only after apply
│
│ Inappropriate value for attribute "ip": string required.
Description
for the nic resources the ip should be a list of string and not a string https://devops.ionos.com/api/cloud/v5/#network-interfaces
this would solve the issue of adding a slave to the failoverip
Expected behavior
add multiple ips to nic
Environment
Terraform version: 0.15.5 Provider version: 5.2.2 OS: Ubuntu 20.04
Configuration Files
How to Reproduce
Error and Debug Output
Additional Notes
References
https://devops.ionos.com/api/cloud/v5/#network-interfaces