Skip to content

Commit

Permalink
Merge pull request #1699 from rsteube/terraform-1.5.0
Browse files Browse the repository at this point in the history
terraform: plan - added new flag from 1.5.0
  • Loading branch information
rsteube authored Jun 19, 2023
2 parents 0c2715d + 98999ce commit 9101d50
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions completers/terraform_completer/cmd/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func init() {
planCmd.Flags().BoolS("compact-warnings", "compact-warnings", false, "Show warnings in a more compact form that includes only the summary messages.")
planCmd.Flags().BoolS("destroy", "destroy", false, "Select the \"destroy\" planning mode.")
planCmd.Flags().BoolS("detailed-exitcode", "detailed-exitcode", false, "Return detailed exit codes when the command exits.")
planCmd.Flags().String("generate-config-out", "", "write HCL configuration for resources to path")
planCmd.Flags().StringS("input", "input", "", "Ask for input for variables if not directly set.")
planCmd.Flags().BoolS("lock", "lock", false, "Don't hold a state lock during the operation.")
planCmd.Flags().StringS("lock-timeout", "lock-timeout", "", "Duration to retry a state lock.")
Expand All @@ -34,6 +35,7 @@ func init() {
planCmd.Flags().StringS("var-file", "var-file", "", "Load variable values from the given file.")
rootCmd.AddCommand(planCmd)

planCmd.Flag("generate-config-out").NoOptDefVal = " "
planCmd.Flag("input").NoOptDefVal = " "
planCmd.Flag("lock-timeout").NoOptDefVal = " "
planCmd.Flag("out").NoOptDefVal = " "
Expand All @@ -44,10 +46,11 @@ func init() {
planCmd.Flag("var-file").NoOptDefVal = " "

carapace.Gen(planCmd).FlagCompletion(carapace.ActionMap{
"out": carapace.ActionFiles(),
"replace": action.ActionResources(planCmd).MultiParts("."),
"state": carapace.ActionFiles(),
"target": action.ActionResources(planCmd).MultiParts("."),
"var-file": carapace.ActionFiles(),
"generate-config-out": carapace.ActionFiles(),
"out": carapace.ActionFiles(),
"replace": action.ActionResources(planCmd).MultiParts("."),
"state": carapace.ActionFiles(),
"target": action.ActionResources(planCmd).MultiParts("."),
"var-file": carapace.ActionFiles(),
})
}

0 comments on commit 9101d50

Please sign in to comment.