-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_prod.tf
executable file
·71 lines (60 loc) · 1.53 KB
/
env_prod.tf
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
resource "heroku_app" "production" {
name = "${var.app_name}-prod"
region = "us"
stack = "container"
organization = {
name = "${var.heroku_team}"
locked = "false"
personal = "false"
}
}
resource "heroku_addon" "database_production" {
app = "${heroku_app.production.id}"
plan = "heroku-postgresql:hobby-dev"
}
resource "heroku_addon" "sendgrid_production" {
app = "${heroku_app.production.id}"
plan = "sendgrid:starter"
}
resource "heroku_domain" "cb_domain" {
app = "${heroku_app.production.id}"
hostname = "${var.app_name}.botics.co"
}
resource "cloudflare_record" "cb_domain_record" {
domain = "botics.co"
name = "${var.app_name}"
value = "${heroku_domain.cb_domain.cname}"
type = "CNAME"
// ttl of 1 is automatic
ttl = 1
}
resource "heroku_pipeline" "pipeline" {
name = "${var.app_name}"
}
resource "heroku_pipeline_coupling" "production" {
app = "${heroku_app.production.name}"
pipeline = "${heroku_pipeline.pipeline.id}"
stage = "production"
}
resource "heroku_build" "production" {
app = "${heroku_app.production.id}"
source = {
url = "${var.repo_url}/archive/master.tar.gz"
}
}
resource "heroku_formation" "formation_prod" {
app = "${heroku_app.production.id}"
type = "web"
quantity = 1
size = "${var.dyno_size}"
depends_on = ["heroku_build.production"]
}
output "app_id" {
value = "${heroku_app.production.uuid}"
}
output "app_name" {
value = "${heroku_app.production.name}"
}
output "web_url" {
value = "${heroku_app.production.web_url}"
}