diff --git a/cmd/azure/command.go b/cmd/azure/command.go index ea63d6be8..ad73f5d16 100644 --- a/cmd/azure/command.go +++ b/cmd/azure/command.go @@ -97,7 +97,7 @@ func Create() *cobra.Command { createCmd.Flags().StringVar(&nodeCountFlag, "node-count", azureDefaults.NodeCount, "the node count for the cluster") createCmd.Flags().StringVar(&nodeTypeFlag, "node-type", azureDefaults.InstanceSize, "the instance size of the cluster to create") createCmd.Flags().StringVar(&dnsProviderFlag, "dns-provider", "azure", fmt.Sprintf("the dns provider - one of: %s", supportedDNSProviders)) - createCmd.Flags().StringVar(&dnsAzureResourceGroup, "dns-azure-resource-group", "", "the resource group where the Azure DNS Zone is hosted") + createCmd.Flags().StringVar(&dnsAzureResourceGroup, "dns-azure-resource-group", "", "the name of the resource group where the DNS Zone exists. If not set, the first matching zone will be used") createCmd.Flags().StringVar(&subdomainNameFlag, "subdomain", "", "the subdomain to use for DNS records (Cloudflare)") createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the Azure/Cloudflare DNS hosted zone name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)") createCmd.MarkFlagRequired("domain-name") diff --git a/cmd/azure/create.go b/cmd/azure/create.go index b42352f34..4297229fd 100644 --- a/cmd/azure/create.go +++ b/cmd/azure/create.go @@ -51,7 +51,7 @@ func createAzure(cmd *cobra.Command, _ []string) error { return nil } - err = ValidateProvidedFlags(cliFlags.GitProvider, cliFlags.DNSProvider, cliFlags.DNSAzureRG) + err = ValidateProvidedFlags(cliFlags.GitProvider) if err != nil { progress.Error(err.Error()) return nil @@ -112,7 +112,7 @@ func createAzure(cmd *cobra.Command, _ []string) error { return nil } -func ValidateProvidedFlags(gitProvider, dnsProvider, dnsAzureResourceGroup string) error { +func ValidateProvidedFlags(gitProvider string) error { progress.AddStep("Validate provided flags") for _, env := range envvarSecrets { @@ -138,9 +138,7 @@ func ValidateProvidedFlags(gitProvider, dnsProvider, dnsAzureResourceGroup strin } } - if dnsProvider == "azure" && dnsAzureResourceGroup == "" { - return fmt.Errorf("the resource group for the azure dns zone is required when using azure dns") - } + progress.CompleteStep("Validate provided flags") return nil }