-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--from-plan
flag to terraform apply/deploy commands. Add `descr…
…ibe config` CLI command (#71) * Add `--from-plan` flag to terraform apply/deploy commands * Add `describe config` CLI command * Update `GetGlobMatches` function * Update `GetGlobMatches` function * Update `GetGlobMatches` function * Update `GetGlobMatches` function * Update `GetGlobMatches` function * Update doublestar to V4 * partial implementation of `terraform clean` * cleanup after testing * go imports formatting * Update `GetGlobMatches` function Co-authored-by: Nuru <[email protected]>
- Loading branch information
Showing
14 changed files
with
140 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ build: | |
|
||
deps: | ||
go mod download | ||
|
||
.PHONY: lint build deps |
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,32 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
e "github.com/cloudposse/atmos/internal/exec" | ||
"github.com/fatih/color" | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
// describeComponentCmd describes configuration for components | ||
var describeConfigCmd = &cobra.Command{ | ||
Use: "config", | ||
Short: "describe config", | ||
Long: `This command shows CLI configuration`, | ||
FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: true}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := e.ExecuteDescribeConfig(cmd, args) | ||
if err != nil { | ||
color.Red("%s\n", err) | ||
fmt.Println() | ||
os.Exit(1) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
describeConfigCmd.DisableFlagParsing = false | ||
describeConfigCmd.PersistentFlags().StringP("format", "f", "json", "'atmos describe config -f json' or 'atmos describe config -f yaml'") | ||
|
||
describeCmd.AddCommand(describeConfigCmd) | ||
} |
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
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
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/cloudposse/atmos/cmd" | ||
"github.com/fatih/color" | ||
"os" | ||
) | ||
|
||
func main() { | ||
|
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
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
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