backend commands
Global backend subcommands
Terraprep has global flags that can be used by any supported backend commands. These are detailed below.
subcommand: init
This subcommand initialises the corresponding backend configuration.
terraprep <supported-backend> init
subcommand: create
This subcommand is used to create the backend resources on the selected backend.
terraprep <supported-backend> create
option: backend
This subcommand is used to provide details of the selected backend.
terraprep <supported-backend> create backend
option: terraform
This subcommand is used to generate the terraform tempalates based on the configurations.
terraprep <supported-backend> create terraform
Examples
> terraprep gcp init
Info: Terraprep gcp config is empty, incomplete or not found.
It must to be populated.
Would you like to load defaults from gcloud cli config? [y/n] y
Info: Loading values from gcloud cli
Info: Default values from gcloud cli config used.
-----------------------------------------
Info: Almost done. We need a bit more information about backend.
Enter a new gcp storage bucket name - leave blank for default [terraprep]:
Info: Config populated.
Info: You can now create azure backend resources.
> terraprep gcp create backend --from-config
[Gcp]
Organisation = "123456789123"
Project = "terraprep-dev"
UserName = "[email protected]"
UserType = "authorized_user"
Region = "europe-west2"
Bucket = "terraprep"
2023/04/17 06:52:55 Bucket terraprep created.
> terraprep gcp create terraform --output-folder ~/Desktop/gcp-templates
Info: Gcp terraform templates created from config in your specified location.