N
Size: a a a
N
A
N
A
AD
N
A
A
N
A
N
A
resource "openstack_blockstorage_volume_v2" "rke_node_root_volume_workernode" {
count = local.cluster.workernodes.count
name = "rke-node-volume-workernodes-${count.index}"
size = local.cluster.etcd.volume_size
snapshot_id = data.openstack_blockstorage_snapshot_v2.rke_nodes_base-snap.id
}
resource "openstack_compute_instance_v2" "rke_node_etcd" {
for_each = "${join(",", openstack_blockstorage_volume_v2.rke_node_root_volume_etcd.*.id)}"
name = "${local.rke_cluster_name}-etcd-${each.key}"
....
Error: Invalid for_each argument
on main.tf line 34, in resource "openstack_compute_instance_v2" "rke_node_etcd":
34: for_each = "${join(",", openstack_blockstorage_volume_v2.rke_node_root_volume_etcd.*.id)}"
The "for_each" value depends on resource attributes that cannot be determined
until apply, so Terraform cannot predict how many instances will be created.
To work around this, use the -target argument to first apply only the
resources that the for_each depends on.
A
N
A
N
A
A
A