hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.52k stars 9.52k forks source link

Terraform show 0.7 panic on lists #7080

Closed sethvargo closed 8 years ago

sethvargo commented 8 years ago

Hi there,

Terraform Version

Terraform v0.7.0-rc1 (301da85f30239e87b30db254a25706a6d41c2522)

Affected Resource(s)

resource "aws_instance" "web" {
  count = "2"

  ami           = "ami-db24d8b6"
  instance_type = "t2.micro"

  subnet_id              = "subnet-..."
  vpc_security_group_ids = ["sg-..."]
}

output "public_ip" {
  value = ["${aws_instance.web.*.public_ip}"]
}

output "public_dns" {
  value = ["${aws_instance.web.*.public_dns}"]
}

Debug Output

https://gist.github.com/sethvargo/79b1ec372036d073d29e587f1616a839

Panic Output

Interestingly, it says panic, but doesn't actually panic.

Expected Behavior

I should have seen list output at the end of terraform show.

Actual Behavior

I saw a panic message.

Steps to Reproduce

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

  1. terraform show

    Important Factoids

    • Using output that is a slice

/cc @jen20

radeksimko commented 8 years ago

I just verified using the config you provided above that this is already fixed in master, closing as a duplicate of https://github.com/hashicorp/terraform/issues/6931 which was fixed via https://github.com/hashicorp/terraform/pull/6958 😉

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.