Skip to content

Commit

Permalink
feat(cmd/scripts/infracost_here): Create shortcut for running infracost
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Mar 28, 2023
1 parent 744b554 commit f95499c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ import (
_ "github.com/sikalabs/slu/cmd/scripts/gitlab_ci"
_ "github.com/sikalabs/slu/cmd/scripts/gitlab_ci/update_docker_images"
_ "github.com/sikalabs/slu/cmd/scripts/gitstats_docker"
_ "github.com/sikalabs/slu/cmd/scripts/infracost_here"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_all"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_argocd"
Expand Down
20 changes: 20 additions & 0 deletions cmd/scripts/infracost_here/infracost_here.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package infracost_here

import (
parent_cmd "github.com/sikalabs/slu/cmd/scripts"
"github.com/sikalabs/slu/utils/exec_utils"
"github.com/spf13/cobra"
)

var Cmd = &cobra.Command{
Use: "infracost-here",
Short: "Run infracost breakdown in current directory",
Aliases: []string{"ic"},
Run: func(c *cobra.Command, args []string) {
exec_utils.ExecOut("infracost", "breakdown", "--path", ".", "--show-skipped")
},
}

func init() {
parent_cmd.Cmd.AddCommand(Cmd)
}

0 comments on commit f95499c

Please sign in to comment.