File: cross-provider.jsonnet

package info (click to toggle)
jsonnet 0.18.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,072 kB
  • sloc: cpp: 66,447; ansic: 8,214; python: 2,768; sh: 1,929; javascript: 1,417; makefile: 192; java: 140
file content (56 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// These can split into separate files, come from environment variables / commandline etc., as
// desired.
local dnsimple_domain = 'foo.com';

// Ubuntu Precise 12.04 LTS (x64)
local aws_amis = {
  'eu-west-1': 'ami-b1cf19c6',
  'us-east-1': 'ami-de7ab6b6',
  'us-west-1': 'ami-3f75767a',
  'us-west-2': 'ami-21f78e11',
};


{
  resource: {
    // Create our Heroku application. Heroku will
    // automatically assign a name.
    heroku_app: {
      web: {
      },
    },

    // Create our DNSimple record to point to the
    // heroku application.
    dnsimple_record: {
      web: {
        domain: dnsimple_domain,

        name: 'terraform',

        // heroku_hostname is a computed attribute on the heroku
        // application we can use to determine the hostname
        value: '${heroku_app.web.heroku_hostname}',

        type: 'CNAME',
        ttl: 3600,
      },
    },

    // The Heroku domain, which will be created and added
    // to the heroku application after we have assigned the domain
    // in DNSimple
    heroku_domain: {
      foobar: {
        app: '${heroku_app.web.name}',
        hostname: '${dnsimple_record.web.hostname}',
      },
    },
  },

  output: {
    address: {
      value: '${dnsimple_record.web.hostname}',
    },
  },
}