oracle-terraform-modules / terraform-oci-compute-instance

Terraform Module for creating Oracle Cloud Infrastructure compute instances
https://registry.terraform.io/modules/oracle-terraform-modules/compute-instance/oci/latest
Other
46 stars 62 forks source link

Outputs produces unnecessarily multidimensional objects #31

Closed cosmindev closed 3 years ago

cosmindev commented 5 years ago

Output variables in the format of unnecessarily multidimensional arrays which are hard to query by other tf code using this module:

provisioner "file" {   connection {     user        = "opc"     agent       = false     private_key = "${chomp(file(var.ssh_private_key_path))}"     timeout     = "10m"     host        = "${module.instance.public_ip[count.index]}"   }     source      = "apache_install.sh"   destination = "/tmp/apache_install.sh" }

the above syntax for getting the host public IP it will not work with multidimensional arrays and it will require unnecessarily complex element()/lookup() functions usage.