Skip to content

Commit

Permalink
OCM-10779 | fix: Error when setting multi-az true for HCP
Browse files Browse the repository at this point in the history
  • Loading branch information
den-rgb committed Aug 30, 2024
1 parent 46e5b49 commit 71b8f11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/machinepool/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ func (m *machinePool) CreateNodePools(r *rosa.Runtime, cmd *cobra.Command, clust
args *mpOpts.CreateMachinepoolUserOptions) error {

var err error
isMultiAvailabilityZoneSet := cmd.Flags().Changed("multi-availability-zone")
if isMultiAvailabilityZoneSet {
return fmt.Errorf("Setting `multi-availability-zone` flag is not supported for HCP clusters.")
}

isAvailabilityZoneSet := cmd.Flags().Changed("availability-zone")
isSubnetSet := cmd.Flags().Changed("subnet")
if isSubnetSet && isAvailabilityZoneSet {
Expand Down

0 comments on commit 71b8f11

Please sign in to comment.