https://rancher.com/ logo
#terraform-provider-rancher2
Title
# terraform-provider-rancher2
a

adamant-kite-43734

09/08/2022, 8:49 PM
This message was deleted.
a

adventurous-battery-36116

09/09/2022, 2:38 AM
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

clever-processor-78736

09/09/2022, 11:41 AM
Thanks!! Will try this!
60 Views