OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / hashicorp / hcl / hcl / test-fixtures / complex.hcl
1 // This comes from Terraform, as a test
2 variable "foo" {
3     default = "bar"
4     description = "bar"
5 }
6
7 provider "aws" {
8   access_key = "foo"
9   secret_key = "bar"
10 }
11
12 provider "do" {
13   api_key = "${var.foo}"
14 }
15
16 resource "aws_security_group" "firewall" {
17     count = 5
18 }
19
20 resource aws_instance "web" {
21     ami = "${var.foo}"
22     security_groups = [
23         "foo",
24         "${aws_security_group.firewall.foo}"
25     ]
26
27     network_interface {
28         device_index = 0
29         description = "Main network interface"
30     }
31 }
32
33 resource "aws_instance" "db" {
34     security_groups = "${aws_security_group.firewall.*.id}"
35     VPC = "foo"
36
37     depends_on = ["aws_instance.web"]
38 }
39
40 output "web_ip" {
41     value = "${aws_instance.web.private_ip}"
42 }