-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
More complex, formatted, outputs with splats #8105
Comments
Hi @RodoM - the An example: resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "int" {
count = 3
vpc_id = "${aws_vpc.main.id}"
cidr_block = "10.0.${count.index}.0/24"
}
output "list" {
value = "${
formatlist(
"Subnet with CIDR %s is in availability zone %s",
aws_subnet.int.*.cidr_block,
aws_subnet.int.*.availability_zone
)}"
}
|
Thanks @phinze that works. It's still not what I'd have expected to be consistent with the non-list case, but it works. As an aside, outputs should not silently fail when there's something wrong with them - is that being addressed? |
I'll answer my own question :-) #5334. |
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. |
Terraform Version
Terraform v0.7.0
Terraform Configuration Files
Assuming a base config as in issue #2821 and this output definition:
Expected Behavior
I'd expect this to render as:
(this kind of thing can already be done in an output where splats/lists are not involved)
Actual Behavior
Nothing is output at all.
The text was updated successfully, but these errors were encountered: