-
Notifications
You must be signed in to change notification settings - Fork 3
/
empatia.tf
70 lines (58 loc) · 1.68 KB
/
empatia.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
module "empatia_user" {
source = "./user"
name = "empatia"
}
resource "aws_route53_zone" "empatia" {
name = "bankempatii.pl"
}
resource "aws_route53_record" "ns_empatia" {
zone_id = aws_route53_zone.empatia.zone_id
name = aws_route53_zone.empatia.name
type = "NS"
ttl = "172800"
records = [
"${aws_route53_zone.empatia.name_servers.0}.",
"${aws_route53_zone.empatia.name_servers.1}.",
"${aws_route53_zone.empatia.name_servers.2}.",
"${aws_route53_zone.empatia.name_servers.3}.",
]
}
resource "aws_route53_record" "soa_empatia" {
zone_id = aws_route53_zone.empatia.zone_id
name = aws_route53_zone.empatia.name
type = "SOA"
ttl = "900"
records = [
"ns-1596.awsdns-07.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400",
]
}
module "empatia_ssl_certificate" {
source = "./ssl_certificate"
domain = "bankempatii.pl"
route53_zone = aws_route53_zone.empatia
providers = {
aws = aws.north_virginia
}
}
module "empatia_frontend_assets" {
source = "./frontend_assets"
name = "empatia"
s3_bucket = aws_s3_bucket.codeforpoznan_public
iam_user = module.empatia_user.user
}
module "empatia_cloudfront_distribution" {
source = "./cloudfront_distribution"
name = "empatia"
domain = "bankempatii.pl"
s3_bucket = aws_s3_bucket.codeforpoznan_public
route53_zone = aws_route53_zone.empatia
iam_user = module.empatia_user.user
acm_certificate = module.empatia_ssl_certificate.certificate
origins = {
static_assets = {
default = true
domain_name = aws_s3_bucket.codeforpoznan_public.bucket_domain_name
origin_path = "/empatia"
}
}
}