terraform_c

package
v0.0.0-...-0e3b330 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scan = &cobra.Command{
	Use:   "scan",
	Short: "Scan for go projects",
	Run: func(cmd *cobra.Command, args []string) {
		clog.Info("{{Scanning for terraform projects...|green}}")
		directory := shell.CurrentDirectory()

		terraform.Scan(directory)
		terraform.VerifyPaths()
	},
}
View Source
var Terraform = &cobra.Command{
	Use:     "terraform",
	Aliases: []string{"tf"},
}
View Source
var Update = &cobra.Command{
	Use:   "apply",
	Short: "Apply terraform project",
	Run: func(cmd *cobra.Command, args []string) {

		if all, err := cmd.Flags().GetBool("all"); err == nil && all {
			terraform.VerifyPaths()

			configuration := cfg.Configuration()
			for path, _ := range configuration.Terraform {
				clog.Info("Applying terraform project {{" + path + "|blue}}")

				shell.RunCmd(path, true, "terraform", "init")
				shell.RunCmd(path, true, "terraform", "apply", "--auto-approve")
			}
		} else {
			clog.Info("To implement")
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL