clusterinthecloud / terraform

Terraform config for Cluster in the Cloud
https://cluster-in-the-cloud.readthedocs.io
MIT License
20 stars 23 forks source link

terraform error - unable to validate #28

Closed jtsaismith closed 5 years ago

jtsaismith commented 5 years ago

I am getting this error when running terraform validate... Error: oci_core_instance.ClusterManagement: expected source_details.0.source_type to be one of [bootVolume image], got map

What are the possible causes of this error?

Thanks for your help!

christopheredsall commented 5 years ago

That is unusual.

It looks like it is coming from https://github.com/ACRC/oci-cluster-terraform/blob/e8dcbb41d2f2d47f7ede8d12322acf41206840c1/compute.tf#L16-L20

I have tried making permutations to the terrafrom.tfvars file and to compute.tf to see if I could reproduce the error message you are seeing and I can't seem to.

Would it be possible to see the output of git status, git diff and the contents of your terrafrom.tfvars file?

christopheredsall commented 5 years ago

I forgot, also the version of terraform. I am testing with

$ terraform --version
Terraform v0.11.8
+ provider.oci v3.27.0
+ provider.template v2.1.2
+ provider.tls v2.0.1
jtsaismith commented 5 years ago

Chris, I hadn't re-pulled from Git since I created a cluster back in late April. So, I pulled from Git, and then re-ran terraform init, and now terraform validate is not returning any error. Hurrah! I am closing this comment.

By the way, this is the version of terraform I'm using:

[opc@chevm1 oci-cluster-terraform]$ terraform version Terraform v0.11.13

Thanks, Jenny