like "${ip2cidr(ec2_instance.private_ip, 32)}", "172.21.3.211" -> "172.21.3.211/32"
variable "addr" { default = "172.21.3.211" }
variable "bits" { default = "25" }
resource "template_file" "cidr" {
template = "$${network}/${var.bits}"
vars {
network = "${cidrhost("${var.addr}/${var.bits}", 0)}"
}
}
output "cidr" { value = "${template_file.cidr.rendered}" }
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/aefc8469-810f-42bc-9a7a-b1983fd72752%40googlegroups.com.