cmd

package
v0.0.0-...-f8ee681 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "terracanary",
	Short: "Deployment orchestration using terraform",
	Long:  `Terracanary provides a wrapper for terraform that manages multiple versions of terraform stacks and facilitates sharing data between multiple related stacks. This allows you to easily construct complex deployment procedures.`,
	Example: `# Apply database infrastructure updates
terracanary apply --stack database
# Run database migrations
...
# Build new copy of infrastructure, using shared database
NEW_VERSION=$(terracanary next)
terracanary apply --stack-version main:$NEW_VERSION --input-stack database
# Run some automated tests on new main stack
HOSTNAME_TO_TEST=$(terracanary output --stack-version main:$NEW_VERSION hostname)
...
# Start sending traffic to new main stack
terracanary apply --stack routing --input-stack-version main:$NEW_VERSION
# Clean up old stack(s)
terracanary destroy --all main --except main:$NEW_VERSION`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		exitIf(config.Read())
		return nil
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.

Types

This section is empty.

Directories

Path Synopsis
util
aws

Jump to

Keyboard shortcuts

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