Skip to content

Commit

Permalink
Revert "Updating help prompts"
Browse files Browse the repository at this point in the history
This reverts commit e1507b4.
  • Loading branch information
magodo committed Mar 1, 2023
1 parent e1507b4 commit b6afcc5
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`")
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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{
Expand All @@ -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{
Expand All @@ -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,
},
Expand All @@ -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{
Expand Down Expand Up @@ -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...)
Expand All @@ -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] <resource scope>",
Usage: "Bring existing Azure resources under Terraform's management",
UsageText: "aztfy [command] [option]",
Before: prepareConfigFile,
Commands: []*cli.Command{
{
Expand Down Expand Up @@ -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] <resource id>",
Flags: resourceFlags,
Before: commandBeforeFunc,
Expand Down Expand Up @@ -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] <resource group name>",
Flags: resourceGroupFlags,
Before: commandBeforeFunc,
Expand Down Expand Up @@ -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] <ARG where predicate>",
Flags: queryFlags,
Before: commandBeforeFunc,
Expand Down Expand Up @@ -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] <resource mapping file>",
Flags: mappingFileFlags,
Before: commandBeforeFunc,
Expand Down

0 comments on commit b6afcc5

Please sign in to comment.