hcl/printer/testdata/complexhcl.golden

43 lines
666 B
Plaintext
Raw Normal View History

variable "foo" {
2015-10-25 14:51:18 +00:00
default = "bar"
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 = [
"foo",
"${aws_security_group.firewall.foo}",
]
2015-10-25 14:51:18 +00:00
network_interface = {
device_index = 0
description = "Main network interface"
}
}
resource "aws_instance" "db" {
2015-10-25 14:51:18 +00:00
security_groups = "${aws_security_group.firewall.*.id}"
VPC = "foo"
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-10-25 15:02:40 +00:00
}