Skip to content

Commit d8e3af2

Browse files
committed
define service_account
1 parent 5f6f8dd commit d8e3af2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

broker/cloud_run/lsst/ps_to_storage/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ survey="${3:-lsst}"
1212
region="${4:-us-central1}"
1313
# get the environment variable
1414
PROJECT_ID=$GOOGLE_CLOUD_PROJECT
15+
PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format="value(projectNumber)")
1516

1617
MODULE_NAME="alerts-to-storage" # lower case required by cloud run
1718
ROUTE_RUN="/" # url route that will trigger main.run()
@@ -37,7 +38,7 @@ ps_subscription_avro=$(define_GCP_resources "${survey}-alert_avros-counter")
3738
ps_topic_avro=$(define_GCP_resources "projects/${PROJECT_ID}/topics/${survey}-alert_avros")
3839
ps_trigger_topic=$(define_GCP_resources "${survey}-alerts_raw")
3940
runinvoker_svcact="cloud-run-invoker@${PROJECT_ID}.iam.gserviceaccount.com"
40-
41+
service_account="service-${PROJECT_NUMBER}@gcp-sa-pubsub.iam.gserviceaccount.com"
4142
if [ "${teardown}" = "True" ]; then
4243
# ensure that we do not teardown production resources
4344
if [ "${testid}" != "False" ]; then

0 commit comments

Comments
 (0)