forked from GoogleCloudPlatform/data-mesh-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatacatalog.tf
217 lines (183 loc) · 4.92 KB
/
datacatalog.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# Dataset tagging
resource "google_data_catalog_tag" "dataset_event_v1_product_tag" {
parent = var.catalog_entry_id_dataset
template = var.tag_template_id_product
fields {
field_name = "data_domain"
enum_value = "Operations"
}
fields {
field_name = "data_subdomain"
enum_value = "Product_Events"
}
fields {
field_name = "data_product_name"
string_value = "Customer Network Events v1"
}
fields {
field_name = "data_product_description"
string_value = "Customer network events, including process names, source and destination IP addresses"
}
fields {
field_name = "business_owner"
string_value = "[email protected]"
}
fields {
field_name = "technical_owner"
string_value = "[email protected]"
}
fields {
field_name = "number_data_resources"
double_value = 2
}
fields {
field_name = "documentation_link"
string_value = "https://network-events.wiki.corp/v1/overview"
}
fields {
field_name = "access_request_link"
string_value = "https://network-events.wiki.corp/v1/access"
}
fields {
field_name = "data_product_status"
enum_value = "RELEASED"
}
fields {
field_name = "last_modified_date"
timestamp_value = "2022-07-05T07:44:12Z"
}
}
# Table tagging
#resource "google_data_catalog_tag" "table_event_v1_event0_product_tag" {
# parent = var.catalog_entry_id_table
# template = var.tag_template_id_product
# fields {
# field_name = "name"
# string_value = "Customer network events"
# }
#
# fields {
# field_name = "description"
# string_value = "Customer network events captured by the appliance. Version 1"
# }
#
# fields {
# field_name = "documentation_url"
# string_value = "https://wiki.example.com/network-events-product"
# }
#
# fields {
# field_name = "business_owner"
# string_value = "[email protected]"
# }
#
# fields {
# field_name = "technical_contact"
# string_value = "[email protected]"
# }
#
# fields {
# field_name = "domain"
# enum_value = "ONLINE_SALES"
# }
#
# fields {
# field_name = "status"
# enum_value = "PRODUCTION"
# }
#}
resource "google_data_catalog_tag" "dataset_event_v1_freshness_tag" {
parent = var.catalog_entry_id_table
template = var.tag_template_id_freshness
fields {
field_name = "expected_freshness"
string_value = "Typically 2 minutes"
}
fields {
field_name = "freshness_endpoint"
string_value = "https://events-product.corp/freshness/events_v1/events0"
}
fields {
field_name = "sla_max_delay_sec"
double_value = "300"
}
fields {
field_name = "sla_percentage"
double_value = "95"
}
fields {
field_name = "sla_period"
enum_value = "MONTH"
}
}
# Table column tagging
resource "google_data_catalog_tag" "dataset_event_v1_well_known_id_tag" {
parent = var.catalog_entry_id_table
template = var.tag_template_id_well_known_id
column = "customer_id"
fields {
field_name = "id"
enum_value = "CUSTOMER_ID"
}
fields {
field_name = "notes"
string_value = "Only the customer ids in X200* to Y300* range can appear in this column."
}
}
# Topic tagging
resource "google_data_catalog_tag" "events_v1_product" {
parent = var.catalog_entry_id_web_traffic_stats_v1_topic
template = var.tag_template_id_pubsub_topic_product
fields {
field_name = "description"
string_value = "Web traffic by location statistics v1"
}
fields {
field_name = "schema_ref"
string_value = "https://console.cloud.google.com/cloudpubsub/schema/detail/${var.pubsub_schema_web_traffic_stats_v1}?project=${var.domain_product_project_id}"
}
}
resource "google_data_catalog_tag" "topic_event_v1_product_tag" {
parent = var.catalog_entry_id_web_traffic_stats_v1_topic
template = var.tag_template_id_product
fields {
field_name = "data_domain"
enum_value = "Operations"
}
fields {
field_name = "data_subdomain"
enum_value = "Product_Events"
}
fields {
field_name = "data_product_name"
string_value = "Web traffic statistics v1"
}
fields {
field_name = "data_product_description"
string_value = "15 minute web click counts per region generated every 5 minutes"
}
fields {
field_name = "business_owner"
string_value = "[email protected]"
}
fields {
field_name = "technical_owner"
string_value = "[email protected]"
}
fields {
field_name = "documentation_link"
string_value = "https://streaming-network-events.wiki.corp/v1/overview"
}
fields {
field_name = "access_request_link"
string_value = "https://streaming-network-events.wiki.corp/v1/access"
}
fields {
field_name = "data_product_status"
enum_value = "RELEASED"
}
fields {
field_name = "last_modified_date"
timestamp_value = "2022-07-06T07:55:12Z"
}
}