Debian Codegraph @

examples/terraform/cross-provider.jsonnet

raw
1 // These can split into separate files, come from environment variables / commandline etc., as
2 // desired.
3 local dnsimple_domain = 'foo.com';
4
5 // Ubuntu Precise 12.04 LTS (x64)
6 local aws_amis = {
7 'eu-west-1': 'ami-b1cf19c6',
8 'us-east-1': 'ami-de7ab6b6',
9 'us-west-1': 'ami-3f75767a',
10 'us-west-2': 'ami-21f78e11',
11 };
12
13
14 {
15 resource: {
16 // Create our Heroku application. Heroku will
17 // automatically assign a name.
18 heroku_app: {
19 web: {
20 },
21 },
22
23 // Create our DNSimple record to point to the
24 // heroku application.
25 dnsimple_record: {
26 web: {
27 domain: dnsimple_domain,
28
29 name: 'terraform',
30
31 // heroku_hostname is a computed attribute on the heroku
32 // application we can use to determine the hostname
33 value: '${heroku_app.web.heroku_hostname}',
34
35 type: 'CNAME',
36 ttl: 3600,
37 },
38 },
39
40 // The Heroku domain, which will be created and added
41 // to the heroku application after we have assigned the domain
42 // in DNSimple
43 heroku_domain: {
44 foobar: {
45 app: '${heroku_app.web.name}',
46 hostname: '${dnsimple_record.web.hostname}',
47 },
48 },
49 },
50
51 output: {
52 address: {
53 value: '${dnsimple_record.web.hostname}',
54 },
55 },
56 }