Set args that will be passed to 'terraform init'
This persistently configures terracanary to pass a set of arguments through to terraform when running 'terraform init' for any stack. The supplied arguments MUST include the state file bucket, key, and region; those values are intercepted by terracanary and used to manage the various statefiles for the different stacks and stack versions (all of which will used the supplied key as a common prefix). Any additional arguments are passed through directly to 'terraform init'. This must be run before any other terracanary commands, and will generate a fresh '.terracanary' config file in the working directory.
Running the following terracanary commands:
terracanary init \
--bucket=my-state-bucket \
--key=my-state-path/filename \
--region=us-east-1 \
-- \
-get-plugins=false
terracanary args -- -var-file=somepath/input.tfvars -var name=foo -var environment=development
terracanary plan -S shared
terracanary apply -S shared
Is the equivalent of running:
cd shared
terraform init \
-backend-config="bucket=my-state-bucket" \
-backend-config="key=my-state-path/filename-shared" \
-backend-config="region=us-east-1" \
-get-plugins=false
terraform plan -var-file=somepath/input.tfvars -var name=foo -var environment=development
terraform apply -var-file=somepath/input.tfvars -var name=foo -var environment=development
terracanary init <flags>... [-- <terraform-flags>...]
--bucket string State file bucket (required)
-h, --help help for init
--key string State file path/name (required)
--region string Region to access bucket in (required)
- terracanary - Deployment orchestration using terraform