From b6afcc599c3670029477ca448cf063b586acb917 Mon Sep 17 00:00:00 2001 From: magodo Date: Wed, 1 Mar 2023 11:18:05 +0800 Subject: [PATCH] Revert "Updating help prompts" This reverts commit e1507b4bf13cb66f276c210947970af01c0d5fe7. --- main.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/main.go b/main.go index 03036ad..e62cbdd 100644 --- a/main.go +++ b/main.go @@ -173,7 +173,7 @@ func main() { return fmt.Errorf("`--hcl-only` only works for local backend") } if flagAppend { - return fmt.Errorf("`--append` conflicts with `--hcl-only`") + return fmt.Errorf("`--appned` conflicts with `--hcl-only`") } if flagModulePath != "" { return fmt.Errorf("`--module-path` conflicts with `--hcl-only`") @@ -216,7 +216,7 @@ func main() { // Interactive mode fmt.Printf(` -The output directory is not empty. Would you like to overwrite the existing files? +The output directory is not empty. Please choose one of actions below: * Press "Y" to overwrite the existing directory with new files * Press "N" to append new files and add to the existing state instead @@ -233,7 +233,7 @@ The output directory is not empty. Would you like to overwrite the existing file } case "n": if flagHCLOnly { - return fmt.Errorf("`--hcl-only` can only run within an empty directory. Consider using the -o flag to specify a non-empty directory.") + return fmt.Errorf("`--hcl-only` can only run within an empty directory") } flagAppend = true default: @@ -264,7 +264,7 @@ The output directory is not empty. Would you like to overwrite the existing file // Honor the "ARM_SUBSCRIPTION_ID" as is used by the AzureRM provider, for easier use. EnvVars: []string{"AZTFY_SUBSCRIPTION_ID", "ARM_SUBSCRIPTION_ID"}, Aliases: []string{"s"}, - Usage: "The subscription id (defaults to current set subscription)", + Usage: "The subscription id", Destination: &flagSubscriptionId, }, &cli.StringFlag{ @@ -288,7 +288,7 @@ The output directory is not empty. Would you like to overwrite the existing file &cli.BoolFlag{ Name: "append", EnvVars: []string{"AZTFY_APPEND"}, - Usage: "Skips cleaning output directory, instead appends to directory and existing state file if any (local backend only)", + Usage: "Skip cleaning up the output directory prior to importing, everything will be imported to the existing state file if any (local backend only)", Destination: &flagAppend, }, &cli.BoolFlag{ @@ -313,7 +313,7 @@ The output directory is not empty. Would you like to overwrite the existing file &cli.BoolFlag{ Name: "full-properties", EnvVars: []string{"AZTFY_FULL_PROPERTIES"}, - Usage: "Outputs all non-computed properties in the generated Terraform configuration. May reuqire manual modifications to make valid config", + Usage: "Whether to output all non-computed properties in the generated Terraform configuration? This probably needs manual modifications to make it valid", Value: false, Destination: &flagFullConfig, }, @@ -335,26 +335,26 @@ The output directory is not empty. Would you like to overwrite the existing file Name: "continue", EnvVars: []string{"AZTFY_CONTINUE"}, Aliases: []string{"k"}, - Usage: "Continues on any import error (use with non-interactive mode only)", + Usage: "In non-interactive mode, whether to continue on any import error", Destination: &flagContinue, }, &cli.BoolFlag{ Name: "generate-mapping-file", Aliases: []string{"g"}, EnvVars: []string{"AZTFY_GENERATE_MAPPING_FILE"}, - Usage: "Generates the resource mapping file but does NOT import any resources (use map command to consume)", + Usage: "Only generate the resource mapping file, but DO NOT import any resource", Destination: &flagGenerateMappingFile, }, &cli.BoolFlag{ Name: "hcl-only", EnvVars: []string{"AZTFY_HCL_ONLY"}, - Usage: "Generates HCL code only but not the files for resource management (e.g. the state file)", + Usage: "Only generate HCL code, but not the files for resource management (e.g. the state file)", Destination: &flagHCLOnly, }, &cli.StringFlag{ Name: "module-path", EnvVars: []string{"AZTFY_MODULE_PATH"}, - Usage: `The path of the module (e.g. "module1.module2") where the resources will be imported and config generated. Note that only modules whose "source" is local path is supported. Defaults to the root module.`, + Usage: `The path of the module (e.g. "module1.module2") where the resources will be imported and config generated. Note that only modules whose "source" is local path is supported. By default, it is the root module.`, Destination: &flagModulePath, }, &cli.StringFlag{ @@ -427,7 +427,7 @@ The output directory is not empty. Would you like to overwrite the existing file Name: "recursive", EnvVars: []string{"AZTFY_RECURSIVE"}, Aliases: []string{"r"}, - Usage: "Recursively list child resources of the query resource(s)", + Usage: "Whether to recursively list child resources of the query result", Destination: &flagRecursive, }, }, resourceGroupFlags...) @@ -443,8 +443,8 @@ The output directory is not empty. Would you like to overwrite the existing file app := &cli.App{ Name: "aztfy", Version: getVersion(), - Usage: "A tool to bring existing Azure resources under Terraform's management", - UsageText: "aztfy [command] [option] ", + Usage: "Bring existing Azure resources under Terraform's management", + UsageText: "aztfy [command] [option]", Before: prepareConfigFile, Commands: []*cli.Command{ { @@ -507,7 +507,7 @@ The output directory is not empty. Would you like to overwrite the existing file { Name: "resource", Aliases: []string{"res"}, - Usage: "Export a single resource", + Usage: "Terrafying a single resource", UsageText: "aztfy resource [option] ", Flags: resourceFlags, Before: commandBeforeFunc, @@ -562,7 +562,7 @@ The output directory is not empty. Would you like to overwrite the existing file { Name: "resource-group", Aliases: []string{"rg"}, - Usage: "Export a resource group and all its resources", + Usage: "Terrafying a resource group and the nested resources resides within it", UsageText: "aztfy resource-group [option] ", Flags: resourceGroupFlags, Before: commandBeforeFunc, @@ -612,7 +612,7 @@ The output directory is not empty. Would you like to overwrite the existing file }, { Name: "query", - Usage: "Export a customized scope of resources determined by an Azure Resource Graph where predicate", + Usage: "Terrafying a customized scope of resources determined by an Azure Resource Graph where predicate", UsageText: "aztfy query [option] ", Flags: queryFlags, Before: commandBeforeFunc, @@ -663,7 +663,7 @@ The output directory is not empty. Would you like to overwrite the existing file { Name: "mapping-file", Aliases: []string{"map"}, - Usage: "Export a customized scope of resources determined by the resource mapping file", + Usage: "Terrafying a customized scope of resources determined by the resource mapping file", UsageText: "aztfy mapping-file [option] ", Flags: mappingFileFlags, Before: commandBeforeFunc,