core commands

Terraprep

Run terraprep or use Global help flag terraprep --help to see all the available commands.

Usage:
  terraprep [command]

Available Commands:
  init        Initialises the terraprep configuration
  validate    Validates dependencies to work with supported backends
  config      Manage and manipulate working terraprep configurations
  gcp         Used to work with terraform gcs backend
  postgres    Used to work with postgres backend

Flags:
  -h, --help      help for terraprep
  -v, --version   version for terraprep

command: init

This command initialises the terraprep configuration. Additionally anytime you want to reset terraprep configuration, you can run init. This command supports Global flags.

terraprep init

command: validate

This command explicitly runs validation steps agains dependencies it needs to carry out tasks. This command supports Global flags.

terraprep validate

command: config

This command allows users to manage and view current running configurations for terraprep. This command supports Global flags.

subcommand: show

This subcommand shows users different configurations stored by terraprep.

terraprep config show

Config command provides multiple flags that can be used to further inspect different configurations.

flag: -c, --core

This flag shows the core config of the terraprep.

flag: -p, --postgres

This flag shows the azure backend config.

flag: -g, --gcp

This flag shows the gcp backend config.

Usage Examples

> terraprep config show --postgres

Showing azure config
----------------------
[Postgres]
  Host = "localhost"
  Port = "5432"
  LocalPostgres = ""
  SslMode = "disable"
  UserName = "postgres"
  UserPass = "a2luZ29maXRNMzIxMjM="
  UserType = "admin"
  DatabaseName = "terraprep2"
> terraprep config show -c

Showing core config
----------------------
Author = "User"

[Terraprep]
  GCPCli = "/opt/homebrew/bin/gcloud"
  GCPCliVersion = "Google Cloud SDK 425.0.0"
  GCPConfig = "/Users/User/.config/gcloud/configurations/config_default"
  GCPFeature = "Enabled"
  PostgresFeature = "Enabled"