You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the problem occurred when the number of MasterVM is 1.
If I declared number of master vm is 1 in tfvars file, then the upcoming error is like this :
$ terraform plan
...
Error: Invalid index
on vm1-Master.tf line 202, in resource "openstack_compute_instance_v2""vm1":
202: group = "${openstack_compute_servergroup_v2.vm1-servergroup-affinity[0].id}"|----------------
| openstack_compute_servergroup_v2.vm1-servergroup-affinity is empty tuple
The given key does not identify an element in this collection value.
Reason of this error is from vm1-Master.tf line 143.
if I declare vm1_number is 1 then the count of vm1-servergroup-affinity goes 0.
So, In vm1-Master.tf line 202 refer to empty array. It causes an error.
But, I saw another line (ex line 152) wrote down like this : count = "${var.vm1_number > 0 ? 1 : 0}"
So my question is :
line 202(vm1-Master.tf) is intended design?
If so, Why is that error occurred?
+) In Terraform v0.12.24, Interpolation-only expressions and Quoted references are deprecated in further version. so I think terraform code in this project should be changed.
Thank you
The text was updated successfully, but these errors were encountered:
Hello,
I tested devops-automation/terraform/powervc-openshift project.
My Terraform version is :
And the problem occurred when the number of MasterVM is 1.
If I declared number of master vm is 1 in tfvars file, then the upcoming error is like this :
Reason of this error is from vm1-Master.tf line 143.
if I declare
vm1_number
is 1 then the count ofvm1-servergroup-affinity
goes 0.So, In vm1-Master.tf line 202 refer to empty array. It causes an error.
But, I saw another line (ex line 152) wrote down like this :
count = "${var.vm1_number > 0 ? 1 : 0}"
So my question is :
+) In Terraform v0.12.24, Interpolation-only expressions and Quoted references are deprecated in further version. so I think terraform code in this project should be changed.
Thank you
The text was updated successfully, but these errors were encountered: