OSDN Git Service

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