You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bf329bc
Browse filesBrowse the repository at this point in the historyBrowse files
createCmd.Flags().StringVarP(&opt.ConfigFile, "file", "f", "", "Path to configuration YAML file")
88
92
createCmd.Flags().StringVar(&opt.Vm.Image, "image", "", "OS image to use (e.g. ubuntu-22.04, fedora-42)")
89
93
94
+
// Register Azure special flags locally too (root registers them as persistent
95
+
// for ls/destroy etc). This makes Lookup work and shows them under create --help.
96
+
createCmd.Flags().StringVar(&flagAzureSubscriptionID, "subscription-id", "", "Azure: subscription ID (required for the azure provider; falls back to `az account show`)")
97
+
createCmd.Flags().StringVar(&flagAzureResourceGroup, "resource-group", "", "Azure: resource group (required for the azure provider; falls back to the az CLI's configured default group, if any)")
98
+
90
99
// Generic VM flags, bound to the viper key the rest of the code already
91
100
// reads. The hetzner.* defaults live in internal/files/init/onctl.yaml,
92
101
// written by `onctl init`; these flag defaults only act as a last-resort
// Azure account-specific settings are needed for many commands (ls, ssh,
239
+
// destroy...), not just create. Register as persistent so resolve runs
240
+
// and flags are available everywhere for the azure provider.
241
+
rootCmd.PersistentFlags().StringVar(&flagAzureSubscriptionID, "subscription-id", "", "Azure: subscription ID (required for the azure provider; falls back to `az account show`)")
242
+
rootCmd.PersistentFlags().StringVar(&flagAzureResourceGroup, "resource-group", "", "Azure: resource group (required for the azure provider; falls back to the az CLI's configured default group, if any)")
0 commit comments