-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
115 lines (112 loc) · 2.54 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
terraform {
required_providers {
statsig = {
version = "0.1.0"
source = "statsig-io/statsig"
}
}
}
resource "statsig_gate" "example_gate" {
name = "example_gate"
description = "A short description of what this Gate is used for."
is_enabled = true
id_type = "userID"
rules {
name = "All Conditions"
pass_percentage = 10
conditions {
type = "public"
}
conditions {
type = "user_id"
target_value = [
"1", "2"
]
operator = "any"
}
conditions {
type = "email"
target_value = ["@outlook.com", "@gmail.com"]
operator = "str_contains_any"
}
conditions {
type = "custom_field"
target_value = [31]
operator = "gt"
field = "age"
}
conditions {
type = "app_version"
target_value = ["1.1.1"]
operator = "version_gt"
}
conditions {
type = "browser_name"
target_value = ["Firefox", "Chrome"]
operator = "any"
}
conditions {
type = "browser_version"
target_value = ["94.0.4606.81", "94.0.4606.92"]
operator = "any"
}
conditions {
type = "os_name"
target_value = ["Android", "Windows"]
operator = "none"
}
conditions {
type = "os_version"
target_value = ["11.0.0"]
operator = "version_lte"
}
conditions {
type = "country"
target_value = ["NZ", "US"]
operator = "any"
}
conditions {
type = "passes_gate"
target_value = ["my_gate_2"]
}
conditions {
type = "fails_gate"
target_value = ["a_failing_gate"]
}
conditions {
type = "time"
target_value = [1643070357193]
operator = "after"
}
conditions {
type = "environment_tier"
target_value = ["production"]
operator = "any"
}
conditions {
type = "passes_segment"
target_value = ["growth_org"]
operator = "any"
}
conditions {
type = "fails_segment"
target_value = ["promo_id_list"]
operator = "any"
}
conditions {
type = "ip_address"
target_value = ["1.1.1.1", "8.8.8.8"]
operator = "any"
}
}
dev_rules {
name = "All Conditions"
pass_percentage = 10
conditions {
type = "public"
}
}
}
output "example_gate" {
value = statsig_gate.example_gate
}