generated from getindata/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
93 lines (76 loc) · 2.43 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
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
resource "snowflake_account_role" "user_role" {
name = "SNOWFLAKE_USER_ROLE"
}
module "terraform_snowflake_user_1" {
source = "../../"
name = "snowflake_user_1"
comment = "Example Snowflake User"
generate_rsa_key = true
generate_password = true
must_change_password = true
email = "[email protected]"
first_name = "John"
middle_name = "Jack"
last_name = "Doe"
display_name = "John Doe"
query_tag = "USER_1"
timezone = "Europe/Warsaw"
enable_unredacted_query_syntax_error = false
disable_mfa = false
default_role = resource.snowflake_account_role.user_role.name
default_secondary_roles_option = "ALL"
}
module "terraform_snowflake_user_2" {
source = "../../"
name = "snowflake_user_2"
context_templates = var.context_templates
type = "PERSON"
generate_rsa_key = true
generate_password = true
must_change_password = true
ignore_changes_on_defaults = false
grant_default_roles = true
email = "[email protected]"
first_name = "Jane"
middle_name = "Kate"
last_name = "Doe"
display_name = "Jane Doe"
query_tag = "USER_2"
timezone = "Europe/Warsaw"
enable_unredacted_query_syntax_error = true
disable_mfa = true
default_role = resource.snowflake_account_role.user_role.name
default_secondary_roles_option = "NONE"
}
module "terraform_snowflake_service_user" {
source = "../../"
type = "SERVICE"
name = "service_user"
context_templates = var.context_templates
name_scheme = {
context_template_name = "snowflake-service-user"
extra_values = {
project = "project"
}
}
comment = "Example Snowflake Service User"
generate_rsa_key = true
query_tag = "SERVICE_USER"
log_level = "ERROR"
trace_level = "ON_EVENT"
default_secondary_roles_option = "NONE"
}
module "terraform_snowflake_legacy_service_user" {
source = "../../"
type = "LEGACY_SERVICE"
name = "legacy_service_user"
name_scheme = {
properties = ["environment", "name", "stage", "project"]
delimiter = "_"
extra_values = {
project = "project"
}
}
generate_password = true
query_tag = "LEGACY_SERVICE_USER"
}