I’m trying to complete a well overdue upgrade from Terraform v0.13.6 to v0.14.8 and run into an error that I can’t get past. The error is:
Error: project: required field is not set
The errors don’t seem to have any additional information so I am unsure where to look to fix/overcome the issue. I have set the logging to TRACE (TF_LOG=TRACE
) but the log file doesn’t seem to have any errors in it.
The configuration is a few thousand lines of configuration across ~20 modules for a google cloud web project (with k8s, s3, pubsub, auth, GPU VM templates and a scaler).
I have upgraded (and downgraded) providers [google, google-beta, kubernetes, null, random] to latest. The version doesn’t seem to have much impact (same result).
The issue crops up with terraform plan
. (terraform init
and terraform validate
are both good).
I have targeted one module at a time with plan
and isolated that one module might be a problem (google pubsub subscription/topic), but when I comment out that code it doesn’t overcome the problem. I wonder if somehow something in the state config is an issue.
Note: I have setup the google (and google-beta) providers with a fixed known project identifier. This is put in from the top level .tf
file via a variable.
Most issues relating to this error tend to have a source reference in the console output. My best google fu is failing me.
Help - how to I find and fix this? What information can I provide to help?
Thanks