From c27e3205be36772e3bc3e4826ab3a068ce0f4561 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Tue, 15 Oct 2024 16:03:37 +0200 Subject: [PATCH] Correct example in upgrade group documentation Signed-off-by: Kobi Samoray --- website/docs/guides/upgrade.html.markdown | 34 +++++++++++++++-------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/website/docs/guides/upgrade.html.markdown b/website/docs/guides/upgrade.html.markdown index af90bc16a..c51a6f423 100644 --- a/website/docs/guides/upgrade.html.markdown +++ b/website/docs/guides/upgrade.html.markdown @@ -109,6 +109,28 @@ consumed using the data sources `nsxt_edge_upgrade_group` and `nsxt_host_upgrade **NOTE:** Only one `nsxt_upgrade_run` resource should be used in the upgrade plan. ```hcl +data "nsxt_policy_host_transport_node" "host_transport_node1" { + display_name = "host_transport_node1" +} + +data "nsxt_policy_host_transport_node" "host_transport_node2" { + display_name = "host_transport_node2" +} + +data "nsxt_policy_host_transport_node" "host_transport_node3" { + display_name = "host_transport_node3" +} + +data "nsxt_edge_upgrade_group" "eg1" { + upgrade_prepare_id = nsxt_upgrade_prepare.test.id + display_name = "edgeupgradegroup1" +} + +data "nsxt_edge_upgrade_group" "eg2" { + upgrade_prepare_id = nsxt_upgrade_prepare.test.id + display_name = "edgeupgradegroup2" +} + resource "nsxt_upgrade_run" "run" { upgrade_prepare_ready_id = data.nsxt_upgrade_prepare_ready.ready.id @@ -127,24 +149,12 @@ resource "nsxt_upgrade_run" "run" { parallel = true } - data "nsxt_policy_host_transport_node" "host_transport_node1" { - display_name = "host_transport_node1" - } - host_group { display_name = "HostWithDifferentSettings" parallel = false hosts = [data.nsxt_policy_host_transport_node.host_transport_node1.id] } - data "nsxt_policy_host_transport_node" "host_transport_node2" { - display_name = "host_transport_node2" - } - - data "nsxt_policy_host_transport_node" "host_transport_node3" { - display_name = "host_transport_node3" - } - host_group { display_name = "OtherHostsWithDifferentSettings" parallel = true