Skip to content

Commit

Permalink
Correct example in upgrade group documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Kobi Samoray <[email protected]>
  • Loading branch information
ksamoray committed Oct 15, 2024
1 parent 06f31a3 commit 7358020
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions website/docs/guides/upgrade.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7358020

Please sign in to comment.