-
Notifications
You must be signed in to change notification settings - Fork 4
/
variables.tf
168 lines (144 loc) · 4.49 KB
/
variables.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
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# --------------------------------------------------
# Set these before applying the configuration
# --------------------------------------------------
terraform {
backend "gcs" {
bucket = "tf_zombies_config"
prefix = "terraform/state"
}
}
variable "credentials_path" {
type = string
description = "The path for the json file generated by step 3"
default = "/home/xxxxx/.config/gcloud/application_default_credentials.json"
}
variable "gcp_project" {
type = string
description = "Google Cloud Project ID where the artifacts will be deployed"
default = "zombies-project"
}
variable "gcp_region" {
type = string
description = "Google Cloud Region"
default = "europe-west1"
}
variable "gcp_merchant_and_gads_dataset_project" {
type = string
description = "The Google Cloud Project ID where the merchant center data and gads are stored"
default = "merchant-gads-project"
}
variable "create_merchant_and_gads_transfers" {
type = bool
description = "true or false to indicate if the data transfers need to be created"
default = true
}
variable "merchant_dataset_name" {
type = string
description = "The name of the dataset to store the Merchant results"
default = "merchant_reports"
}
variable "gads_dataset_name" {
type = string
description = "The name of the dataset to store the GAds results"
default = "gads_reports"
}
variable "merchant_schedule" {
type = string
description = "Schedule for the Merchant scheduled data transfers"
default = "every day 00:00"
}
variable "gads_schedule" {
type = string
description = "Schedule for the GAds scheduled data transfers"
default = "every day 00:00"
}
variable "zombies_bucket_name" {
type = string
description = "Bucket for the Cloud function"
default = "zombies-bucket"
}
variable "zombies_bucket_location" {
type = string
description = "Location for the bucket"
default = "US"
}
variable "zombies_sa" {
type = string
description = "Name for the service account without project name"
default = "zombies-sa"
}
variable "zombies_data_location" {
type = string
description = "Region for the zombies dataset"
default = "US"
}
variable "zombies_dataset_name" {
type = string
description = "The name of the dataset to store the zombies insights"
default = "zombies"
}
variable "zombies_schedule" {
type = string
description = "Schedule for the BQ scheduled queries"
default = "every day 03:00"
}
variable "zombies_pubsub_topic" {
type = string
description = "Topic to publish the pubsub message to"
default = "zombies_ready"
}
variable "zombies_sql_condition" {
type = string
description = "Condition to select the zombies"
default = "offer_id_clicks = 0"
}
variable "zombies_deciles" {
type = number
description = "Number of deciles to calculate"
default = 10
}
variable "zombies_impressions_decil" {
type = number
description = "Decil to consider for impressions"
default = 2
}
variable "zombies_clicks_decil" {
type = number
description = "Decil to consider for clicks"
default = 4
}
variable "generate_feed_files" {
type = bool
description = "true or false to indicate if Cloud Functions to generate files in Google Cloud Storage must be deployed"
default = true
}
variable "zombies_feed_label_index" {
type = string
description = "The id of the shopping feed product label to use to tag the product as zombie"
default = "4"
}
variable "accounts_table" {
type = map(object({
mc = string,
gads = string,
gcs_url = string
}))
default = {
# "1" = { "mc": "111111111", "gads": "222222222", "gcs_url": "gs://zombies-on-steroids-bucket"},
# "2" = { "mc": "3333333333", "gads": "444444444", "gcs_url": "gs://zombies-on-steroids-bucket"}
}
}