Skip to content

Commit

Permalink
terragrunt: added groups
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 24, 2023
1 parent fcf16dd commit eca35c0
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/awsProviderPatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var awsProviderPatchCmd = &cobra.Command{
Use: "aws-provider-patch",
Short: "Overwrite settings on nested AWS providers to work around a Terraform bug",
Run: func(cmd *cobra.Command, args []string) {},
Use: "aws-provider-patch",
Short: "Overwrite settings on nested AWS providers to work around a Terraform bug",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/graphDependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var graphDependenciesCmd = &cobra.Command{
Use: "graph-dependencies",
Short: "Prints the terragrunt dependency graph to stdout",
Run: func(cmd *cobra.Command, args []string) {},
Use: "graph-dependencies",
Short: "Prints the terragrunt dependency graph to stdout",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/hclfmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var hclfmtCmd = &cobra.Command{
Use: "hclfmt",
Short: "Recursively find hcl files and rewrite them into a canonical format",
Run: func(cmd *cobra.Command, args []string) {},
Use: "hclfmt",
Short: "Recursively find hcl files and rewrite them into a canonical format",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/renderJson.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var renderJsonCmd = &cobra.Command{
Use: "render-json",
Short: "Render the final terragrunt config as json",
Run: func(cmd *cobra.Command, args []string) {},
Use: "render-json",
Short: "Render the final terragrunt config as json",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down
5 changes: 5 additions & 0 deletions completers/terragrunt_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ func Execute() error {
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.AddGroup(
&cobra.Group{ID: "", Title: ""}, // dummy command to have different highlighting than terraform
&cobra.Group{ID: "terragrunt", Title: "Terragrunt Commands"},
)

carapace.Gen(rootCmd).PositionalAnyCompletion(
bridge.ActionCarapaceBin("terraform"),
)
Expand Down
1 change: 1 addition & 0 deletions completers/terragrunt_completer/cmd/runAll.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
var runAllCmd = &cobra.Command{
Use: "run-all",
Short: "Run a terraform command against a 'stack' by running the specified command in each subfolder",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
DisableFlagParsing: true,
}
Expand Down
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/terragruntInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var terragruntInfoCmd = &cobra.Command{
Use: "terragrunt-info",
Short: "Emits limited terragrunt state on stdout and exits",
Run: func(cmd *cobra.Command, args []string) {},
Use: "terragrunt-info",
Short: "Emits limited terragrunt state on stdout and exits",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions completers/terragrunt_completer/cmd/validateInputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
)

var validateInputsCmd = &cobra.Command{
Use: "validate-inputs",
Short: "Checks if the terragrunt configured inputs align with the terraform defined variables",
Run: func(cmd *cobra.Command, args []string) {},
Use: "validate-inputs",
Short: "Checks if the terragrunt configured inputs align with the terraform defined variables",
GroupID: "terragrunt",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
Expand Down

0 comments on commit eca35c0

Please sign in to comment.