This message was deleted.
# terraform-provider-rancher2
a
This message was deleted.
a
Here’s a local that I use for associating hostnames with IPs:
Copy code
locals {
  node_ip = values(zipmap(rancher2_cluster_sync.get_node_info.nodes[*].hostname, rancher2_cluster_sync.get_node_info.nodes[*].ip_address))
}
You’ll also need the
rancher2_cluster_sync
resource for this, but it doesn’t need any arguments:
Copy code
resource "rancher2_cluster_sync" "get_node_info" {
  cluster_id = rancher2_cluster_v2.rke2.cluster_v1_id
}
c
Thanks!! Will try this!