IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
341 stars 670 forks source link

panic: runtime error: index out of range #223

Closed joeabbey closed 6 years ago

joeabbey commented 6 years ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.11.7

Affected Resource(s)

Probably ibm_lbaas

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

ibm.tar.gz

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log. https://gist.github.com/joeabbey/db698234cd12b776d350c96573ae7242

Expected Behavior

3 managers, 3 workers, and 3 DTR along with supporting load balancers should have been created.

Actual Behavior

Crash during load balancer provisioning

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Copy terraform.tfvars.example to terraform.tfvars
  2. Provide a value for all of the variables
  3. terraform init && terraform apply -auto-approve

Important Factoids?

References

Praveengostu commented 6 years ago

@joeabbey From the crash file it shows the error as

runtime error: index out of range
github.com/hashicorp/terraform/config.interpolationFuncFormatList.func1(0xc420a22380, 0x4, 0x4, 0xc420a22380, 0x4, 0x4, 0x100000040)
    /opt/gopath/src/github.com/hashicorp/terraform/config/interpolate_funcs.go:677 +0x81d

Could you please share the state file or output of terraform show command

Praveengostu commented 6 years ago

We tried to apply the configuration, as there is no modules/ansible we removed the module "inventory" and did a terraform apply and which is successfully completed. So if there is some issue with module inventory in file ansible_inventory.tf could you please try to enable the debug by export TF_LOG=debug and share us debug output along with the state file.

joeabbey commented 6 years ago

Ah, thanks for the confirmation. I see where the bug is now. We have some logic for windows instances that needs to be fleshed out. In our CI, we were requesting a windows instance, and this appears to blow up the inventory production. Closing!