cf-terraforming
cf-terraforming copied to clipboard
FATA 0023 configuration is invalid
Confirmation
- [X] My issue isn't already found on the issue tracker.
- [X] I have replicated my issue using the latest version of the library and it is still present.
cf-terraforming version
0.8.1
Expected outcome
To generate stanzas
Actual outcome
Failed with non helpful error message.
Steps to reproduce
cf-terraforming generate --zone <zone_id> --resource-type cloudflare_record
CLOUDFLARE_API_TOKEN env var is set.
References
No response
this works fine here; can you please include more information as to how you've hit this? running commands with the --debug flag will provide more useful information.
$ cf-terraforming generate -t $CLOUDFLARE_API_TOKEN --resource-type cloudflare_record -a <account_id> --zone <zone> --verbose
DEBU[0000] --account and --zone are mutually exclusive, support for both is deprecated
DEBU[0000] initializing cloudflare-go with API Token account_Id=<account_id> zone_id=<zone>
DEBU[0000] configuring Cloudflare API with account account_id=<account_id>
DEBU[0022] initializing Terraform in .
FATA[0023] configuration is invalid
ok, this is different to your issue repro. have you tried without the account argument? you shouldn't be providing them both in the same invocation.
you'll also want to confirm you have a working and initialised Terraform directory to operate this binary from.
I am facing the same issue.
Note that cf-terraforming uses the actual Terraform provider you have installed in your config. So it needs to run from a valid Terraform setup locally.
Ensure that terraform validate passes in the same directory, and importantly, that the Cloudflare provider doesn't depend on any Terraform input variables or it will fail with this cryptic error- I had planned to pass the API key as an input var rather than using an env var and this tripped me up.