-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1042 from rsteube/add-terragrunt
added terragrunt
- Loading branch information
Showing
10 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
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) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(awsProviderPatchCmd).Standalone() | ||
|
||
rootCmd.AddCommand(awsProviderPatchCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var graphDependenciesCmd = &cobra.Command{ | ||
Use: "graph-dependencies", | ||
Short: "Prints the terragrunt dependency graph to stdout", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(graphDependenciesCmd).Standalone() | ||
|
||
rootCmd.AddCommand(graphDependenciesCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
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) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(hclfmtCmd).Standalone() | ||
|
||
rootCmd.AddCommand(hclfmtCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var renderJsonCmd = &cobra.Command{ | ||
Use: "render-json", | ||
Short: "Render the final terragrunt config as json", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(renderJsonCmd).Standalone() | ||
|
||
rootCmd.AddCommand(renderJsonCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
terraform "github.com/rsteube/carapace-bin/completers/terraform_completer/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var rootCmd = &cobra.Command{ | ||
Use: "terragrunt", | ||
Short: "Terragrunt is a thin wrapper for Terraform", | ||
Long: "https://terragrunt.gruntwork.io/", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func Execute() error { | ||
return rootCmd.Execute() | ||
} | ||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
carapace.Gen(rootCmd).PositionalAnyCompletion( | ||
terraform.ActionExecute(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
terraform "github.com/rsteube/carapace-bin/completers/terraform_completer/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var runAllCmd = &cobra.Command{ | ||
Use: "run-all", | ||
Short: "Run a terraform command against a 'stack' by running the specified command in each subfolder", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
DisableFlagParsing: true, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(runAllCmd).Standalone() | ||
|
||
rootCmd.AddCommand(runAllCmd) | ||
|
||
carapace.Gen(runAllCmd).PositionalAnyCompletion( | ||
terraform.ActionExecute(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var terragruntInfoCmd = &cobra.Command{ | ||
Use: "terragrunt-info", | ||
Short: "Emits limited terragrunt state on stdout and exits", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(terragruntInfoCmd).Standalone() | ||
|
||
rootCmd.AddCommand(terragruntInfoCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
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) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(validateInputsCmd).Standalone() | ||
|
||
rootCmd.AddCommand(validateInputsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "github.com/rsteube/carapace-bin/completers/terragrunt_completer/cmd" | ||
|
||
func main() { | ||
cmd.Execute() | ||
} |