Hi,
During my progress of updating terraform, im stuck at 0.15.5.
My CI has no problems in running terraform fmt
and terraform validate
, but the problems starts on using the init
command.
When calling terraform init
the output is only its usages and then exits with code 1.
Running init locally works just fine. I couldnt find any breaking changes in the changelog.
Is there any information usable to debug this? Everything works fine on 0.14.x
This is the command run
$ terraform -chdir=terraform/env/${STAGE} init -no-color
{"@level":"debug","@message":"Adding temp file log sink: /tmp/terraform-log325288379","@timestamp":"2021-11-11T15:09:11.605656Z"}
{"@level":"info","@message":"Terraform version: 0.15.5","@timestamp":"2021-11-11T15:09:11.606139Z"}
{"@level":"info","@message":"Go runtime version: go1.16.4","@timestamp":"2021-11-11T15:09:11.606324Z"}
{"@level":"info","@message":"CLI args: []string{\"/usr/local/bin/terraform\", \"-chdir=terraform/env/staging\", \"init\", \"-no-color\"}","@timestamp":"2021-11-11T15:09:11.606511Z"}
{"@level":"trace","@message":"Stdout is not a terminal","@timestamp":"2021-11-11T15:09:11.606773Z"}
{"@level":"trace","@message":"Stderr is not a terminal","@timestamp":"2021-11-11T15:09:11.606921Z"}
{"@level":"trace","@message":"Stdin is not a terminal","@timestamp":"2021-11-11T15:09:11.607081Z"}
{"@level":"debug","@message":"Attempting to open CLI config file: /builds/backend.tmp/TF_CLI_CONFIG_FILE","@timestamp":"2021-11-11T15:09:11.607230Z"}
{"@level":"info","@message":"Loading CLI configuration from /builds/backend.tmp/TF_CLI_CONFIG_FILE","@timestamp":"2021-11-11T15:09:11.607468Z"}
{"@level":"debug","@message":"Not reading CLI config directory because config location is overridden by environment variable","@timestamp":"2021-11-11T15:09:11.607644Z"}
{"@level":"debug","@message":"ignoring non-existing provider search directory terraform.d/plugins","@timestamp":"2021-11-11T15:09:11.607776Z"}
{"@level":"debug","@message":"ignoring non-existing provider search directory /home/nonroot/.terraform.d/plugins","@timestamp":"2021-11-11T15:09:11.607885Z"}
{"@level":"debug","@message":"ignoring non-existing provider search directory /home/nonroot/.local/share/terraform/plugins","@timestamp":"2021-11-11T15:09:11.607936Z"}
{"@level":"debug","@message":"ignoring non-existing provider search directory /usr/local/share/terraform/plugins","@timestamp":"2021-11-11T15:09:11.608003Z"}
{"@level":"debug","@message":"ignoring non-existing provider search directory /usr/share/terraform/plugins","@timestamp":"2021-11-11T15:09:11.608038Z"}
{"@level":"info","@message":"TF_CLI_ARGS_init value: \"-lock-timeout=10m\"","@timestamp":"2021-11-11T15:09:11.608520Z"}
{"@level":"info","@message":"CLI command args: []string{\"init\", \"-lock-timeout=10m\", \"-no-color\"}","@timestamp":"2021-11-11T15:09:11.608558Z"}
Usage: terraform [global options] init [options]
Initialize a new or existing Terraform working directory by creating
initial files, loading any remote state, downloading modules, etc.
This is the first command that should be run for any new or existing
Terraform configuration per machine. This sets up all the local data
necessary to run Terraform that is typically not committed to version
control.
This command is always safe to run multiple times. Though subsequent runs
may give errors, this command will never delete your configuration or
state. Even so, if you have important information, please back it up prior
to running this command, just in case.