forked from cloudposse/terraform-aws-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexternal-dns.tf
executable file
·39 lines (29 loc) · 900 Bytes
/
external-dns.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
# https://github.com/kubernetes-sigs/external-dns
module "external-dns" {
source = "./modules/service-account"
service_account_name = "external-dns"
service_account_namespace = "kube-system"
aws_iam_policy_document = data.aws_iam_policy_document.external_dns.json
cluster_context = local.cluster_context
context = module.this.context
}
data "aws_iam_policy_document" "external_dns" {
statement {
sid = "GrantChangeResourceRecordSets"
actions = [
"route53:ChangeResourceRecordSets"
]
effect = "Allow"
resources = formatlist("arn:aws:route53:::hostedzone/%s", local.zone_ids)
}
statement {
sid = "GrantListHostedZonesListResourceRecordSets"
actions = [
"route53:ListHostedZones",
"route53:ListHostedZonesByName",
"route53:ListResourceRecordSets"
]
effect = "Allow"
resources = ["*"]
}
}