Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputs produces unnecessarily multidimensional objects #31

Closed
cosmindev opened this issue Jun 3, 2019 · 0 comments · Fixed by #49
Closed

Outputs produces unnecessarily multidimensional objects #31

cosmindev opened this issue Jun 3, 2019 · 0 comments · Fixed by #49
Labels
enhancement New feature or request
Milestone

Comments

@cosmindev
Copy link

cosmindev commented Jun 3, 2019

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

  • output code example:
    output "public_ip" { description = "Public IPs of created instances. " value = ["${module.instance.public_ip}"] }
  • generated output:
    public_ip = [ [ "132.145.XX.YY", "132.145.XX.YY", ], ]
  • Example usecase: remote exec connection blocks

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.

@kral2 kral2 added the enhancement New feature or request label Jan 25, 2021
@kral2 kral2 added this to the v3.0.0 milestone Jan 26, 2021
@kral2 kral2 changed the title Unnecessarily multidimensional output variables Outputs produces unnecessarily multidimensional objects Feb 16, 2021
kral2 added a commit to kral2/terraform-oci-compute-instance that referenced this issue Feb 16, 2021
Add new output: instances_summary
Fix outputs (Issue oracle-terraform-modules#31)
@kral2 kral2 linked a pull request Feb 16, 2021 that will close this issue
kral2 added a commit that referenced this issue Feb 18, 2021
Fix #42 - Add possibility to create flex instance shapes
Fix #31 - Outputs produces unnecessarily multidimensional objects

Add new output: instances_summary
Add repo housekeeping options (pre-commit hooks, gitattributes)
@kral2 kral2 mentioned this issue Mar 2, 2021
@kral2 kral2 closed this as completed in ea9e9b8 Mar 2, 2021
@kral2 kral2 modified the milestones: Future, v2.1.0 Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants