-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent_role.tf
60 lines (58 loc) · 1.98 KB
/
agent_role.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
resource "google_service_account" "redpanda_agent" {
account_id = "redpanda-agent"
display_name = "Redpanda Agent Service Account"
project = var.project_id
}
resource "google_project_iam_custom_role" "redpanda_agent_role" {
role_id = "redpanda_agent_role"
title = "Redpanda Agent Role"
description = "A role comprising general permissions allowing the agent to manage Redpanda cluster resources."
permissions = [
"compute.firewalls.get",
"compute.globalOperations.get",
"compute.instanceGroupManagers.get",
"compute.instanceGroupManagers.delete",
"compute.instanceGroups.delete",
"compute.instances.list",
"compute.instanceTemplates.delete",
"compute.networks.get",
"compute.networks.getRegionEffectiveFirewalls",
"compute.networks.getEffectiveFirewalls",
"compute.projects.get",
"compute.subnetworks.get",
"compute.zoneOperations.get",
"compute.zoneOperations.list",
"compute.zones.get",
"compute.zones.list",
"dns.changes.create",
"dns.changes.get",
"dns.changes.list",
"dns.managedZones.create",
"dns.managedZones.delete",
"dns.managedZones.get",
"dns.managedZones.list",
"dns.managedZones.update",
"dns.projects.get",
"dns.resourceRecordSets.create",
"dns.resourceRecordSets.delete",
"dns.resourceRecordSets.get",
"dns.resourceRecordSets.list",
"dns.resourceRecordSets.update",
"iam.roles.get",
"iam.roles.list",
"iam.serviceAccounts.actAs",
"iam.serviceAccounts.get",
"iam.serviceAccounts.getIamPolicy",
"resourcemanager.projects.get",
"resourcemanager.projects.getIamPolicy",
"serviceusage.services.list",
"storage.buckets.get",
"storage.buckets.getIamPolicy",
]
project = var.project_id
}
resource "google_project_iam_member" "redpanda_agent_role_binding" {
project = var.project_id
role = google_project_iam_custom_role.redpanda_agent_role.id
member = "serviceAccount:${google_service_account.redpanda_agent.email}"
}