forked from GoogleCloudPlatform/data-mesh-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
41 lines (33 loc) · 1.19 KB
/
main.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
terraform {
required_providers {
google = {
source = "google"
version = "~> 4.21.0"
}
}
}
provider "google" {
project = var.central_catalog_project_id
impersonate_service_account = var.central_catalog_admin_sa
}
# TODO: use iteration to make it less verbose
resource "google_data_catalog_tag_template_iam_member" "tagger_sa_product_user" {
tag_template = var.tag_template_id_product
role = "roles/datacatalog.tagTemplateUser"
member = "serviceAccount:${var.tagger_sa}"
}
resource "google_data_catalog_tag_template_iam_member" "tagger_sa_data_quality_user" {
tag_template = var.tag_template_id_freshness
role = "roles/datacatalog.tagTemplateUser"
member = "serviceAccount:${var.tagger_sa}"
}
resource "google_data_catalog_tag_template_iam_member" "tagger_sa_well_known_id_user" {
tag_template = var.tag_template_id_well_known_id
role = "roles/datacatalog.tagTemplateUser"
member = "serviceAccount:${var.tagger_sa}"
}
resource "google_data_catalog_tag_template_iam_member" "tagger_sa_pubsub_topic_product_user" {
tag_template = var.tag_template_id_pubsub_topic_product
role = "roles/datacatalog.tagTemplateUser"
member = "serviceAccount:${var.tagger_sa}"
}