-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path5-sql-review.tf
More file actions
43 lines (42 loc) · 1.02 KB
/
5-sql-review.tf
File metadata and controls
43 lines (42 loc) · 1.02 KB
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
resource "bytebase_review_config" "sample" {
depends_on = [
bytebase_setting.environments
]
resource_id = "review-config-sample"
title = "Sample SQL Review Config"
enabled = true
resources = toset([
bytebase_setting.environments.environment_setting[0].environment[1].name
])
rules {
type = "COLUMN_NO_NULL"
engine = "POSTGRES"
level = "WARNING"
}
rules {
type = "COLUMN_REQUIRED"
engine = "POSTGRES"
level = "ERROR"
string_array_payload = ["id", "created_ts", "updated_ts", "creator_id", "updater_id"]
}
rules {
type = "TABLE_REQUIRE_PK"
engine = "POSTGRES"
level = "ERROR"
}
rules {
type = "NAMING_COLUMN"
engine = "POSTGRES"
level = "ERROR"
naming_payload {
format = "^[a-z]+(_[a-z]+)*$"
max_length = 64
}
}
rules {
type = "STATEMENT_MAXIMUM_LIMIT_VALUE"
engine = "POSTGRES"
level = "ERROR"
number_payload = 1000
}
}