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

resource aws_route53_record does not splat in output value #3159

Closed
alexintel opened this issue Sep 3, 2015 · 3 comments
Closed

resource aws_route53_record does not splat in output value #3159

alexintel opened this issue Sep 3, 2015 · 3 comments

Comments

@alexintel
Copy link

There is a regression issue in the current v0.6.3 of Terraform. 0.5.3 version works fine:

resource "aws_route53_record" "service-dns" {
  zone_id = "my_correct_zone_id" # correct zone ID
  name    = "webservice-${count.index+1}"   # DNS name: webservice-[1/2/n]
  type      = "A"
  ttl          = "60"
  # record == private_IP of the instance created using aws_instance resource
  records = ["${element(aws_instance.webservice.*.private_ip, count.index)}"] 
  # number of records to create, equal to number of instances in aws_instance resource
  count    = "${var.instance_count}"
}

In outputs section:

output "internal_dns" {
  value = "${join(",", aws_instance.webservice.*.private_ip)}"
}

output "service_hostnames" {
  value = "${join(",", aws_route53_record.service-dns.*.name)}"
}

Actual terminal output:

# Correct in Terraform 0.5.3
  internal_dns      = 10.151.2.123,10.151.2.132
  service_hostnames   = webservice-1, webservice-2
#v. 0.6.3
  internal_dns      = 10.151.2.123,10.151.2.132
  ### service_hostnames does not even show up in the output
  ### all other outputs before and after display correctly

v0.6.3

terraform output service_hostnames

The output variable requested could not be found in the state
file. If you recently added this to your configuration, be
sure to run `terraform apply`, since the state won't be updated
with new output variables until that command is run.


terraform output internal_dns
10.151.2.122,10.151.2.174
@alexintel
Copy link
Author

Using lower case characters in DNS name resolves this issue. Related to #3246

Still a regression in compared to 0.5.3

@alexintel
Copy link
Author

Closing issue in lieu of #3246

@ghost
Copy link

ghost commented May 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant