Skip to content

Commit 9250434

Browse files
committed
update setup_broker.sh
1 parent 7c387f4 commit 9250434

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

broker/setup_broker/setup_broker.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ manage_resources() {
8787
gcloud pubsub topics create "${topic_alert_data_deadletter}"
8888
gcloud pubsub subscriptions create "${subscription_diasource_deadletter}" --topic="${topic_diasource_deadletter}"
8989
gcloud pubsub subscriptions create "${subscription_alert_data_deadletter}" --topic="${topic_alert_data_deadletter}"
90+
# in order to create BigQuery subscriptions, ensure that the following service account:
91+
# service-<project number>@gcp-sa-pubsub.iam.gserviceaccount.com" has the
92+
# bigquery.dataEditor role for each table
9093
gcloud pubsub subscriptions create "${subscription_alert_data}" \
9194
--topic="${topic_alert_data}" \
9295
--bigquery-table="${PROJECT_ID}:${bq_dataset}.${alerts_table}" \
@@ -166,7 +169,6 @@ if [ "$teardown" != "True" ]; then
166169
--description="Allow incoming traffic on TCP port 9094" \
167170
--direction=INGRESS \
168171
--enable-logging
169-
170172
fi
171173

172174
#--- Deploy Cloud Functions
@@ -190,6 +192,10 @@ cd .. && cd lite || exit
190192
cd .. && cd ps_to_gcs || exit
191193
./deploy.sh "$testid" "$teardown" "$survey" "$versiontag" "$region"
192194

195+
#--- BigQuery storage cloud function
196+
cd .. && cd store_BigQuery || exit
197+
./deploy.sh "$testid" "$teardown" "$survey" "$versiontag"
198+
193199
#--- tag alerts cloud function
194200
cd .. && cd tag || exit
195201
./deploy.sh "$testid" "$teardown" "$survey" "$versiontag"

0 commit comments

Comments
 (0)