forked from cloudposse/terraform-aws-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cert-manager.tf
executable file
·49 lines (36 loc) · 1.03 KB
/
cert-manager.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
# https://cert-manager.io/docs/configuration/acme/dns01/route53/
module "cert-manager" {
source = "./modules/service-account"
service_account_name = "cert-manager"
service_account_namespace = "cert-manager"
aws_iam_policy_document = data.aws_iam_policy_document.cert_manager.json
cluster_context = local.cluster_context
context = module.this.context
}
data "aws_iam_policy_document" "cert_manager" {
statement {
sid = "GrantGetChange"
actions = [
"route53:GetChange"
]
effect = "Allow"
resources = ["arn:aws:route53:::change/*"]
}
statement {
sid = "GrantChangeResourceRecordSets"
actions = [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
]
effect = "Allow"
resources = formatlist("arn:aws:route53:::hostedzone/%s", local.zone_ids)
}
statement {
sid = "GrantListHostedZonesListResourceRecordSets"
actions = [
"route53:ListHostedZonesByName"
]
effect = "Allow"
resources = ["*"]
}
}