hcl/printer/testdata/complexhcl.golden

44 lines
683 B
Plaintext
Raw Normal View History

variable "foo" {
default = "bar"
2015-10-25 14:51:18 +00:00
description = "bar"
}
2015-10-25 16:09:22 +00:00
developer = ["fatih", "arslan"]
provider "aws" {
2015-10-25 14:51:18 +00:00
access_key = "foo"
secret_key = "bar"
}
provider "do" {
2015-10-25 14:51:18 +00:00
api_key = "${var.foo}"
}
resource "aws_security_group" "firewall" {
2015-10-25 14:51:18 +00:00
count = 5
}
resource aws_instance "web" {
2015-10-25 14:51:18 +00:00
ami = "${var.foo}"
2015-10-25 14:51:18 +00:00
security_groups = [
2015-11-01 00:23:33 +00:00
"foo",
2015-10-25 14:51:18 +00:00
"${aws_security_group.firewall.foo}",
]
2015-10-25 14:51:18 +00:00
network_interface = {
device_index = 0
description = "Main network interface"
2015-10-25 14:51:18 +00:00
}
}
resource "aws_instance" "db" {
2015-10-25 14:51:18 +00:00
security_groups = "${aws_security_group.firewall.*.id}"
VPC = "foo"
2015-10-31 22:28:11 +00:00
2015-10-25 16:09:22 +00:00
depends_on = ["aws_instance.web"]
2015-10-25 14:51:18 +00:00
}
output "web_ip" {
2015-10-25 14:51:18 +00:00
value = "${aws_instance.web.private_ip}"
2015-11-04 14:27:17 +00:00
}