Skip to content

Commit 6faf713

Browse files
committed
updated deploy.sh
1 parent 1ccc195 commit 6faf713

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

gcp_cloud_function_sql_export/deploy.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
# Author: Hari Sekhon
55
# Date: 2020-10-16 10:12:26 +0100 (Fri, 16 Oct 2020)
66
#
7+
# https://github.com/HariSekhon/pytools
8+
#
9+
# License: see accompanying Hari Sekhon LICENSE file
10+
#
11+
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
12+
#
13+
# https://www.linkedin.com/in/HariSekhon
14+
#
715

816
set -euo pipefail
917
[ -n "${DEBUG:-}" ] && set -x
@@ -17,6 +25,9 @@ region="europe-west3" # not available in all regions yet
1725
name="cloud-sql-backups"
1826
topic="cloud-sql-backups"
1927
service_account="cloud-function-sql-backup@$project.iam.gserviceaccount.com"
20-
vpc_connector="cloud-sql-backups" # for triggering across regions since Cloud Function may not be in the same region as the Cloud SQL instances to back up
28+
# https://console.cloud.google.com/marketplace/product/google/vpcaccess.googleapis.com
29+
# for serverless VPC access to resources using their Private IPs
30+
# since we're only accessing the SQL Admin API we don't need this
31+
#vpc_connector="cloud-sql-backups"
2132

22-
gcloud functions deploy "$name" --trigger-topic "$topic" --runtime python37 --entry-point main --service-account "$service_account" --region "$region" --timeout 60 --vpc-connector "$vpc_connector" --memory 128MB
33+
gcloud functions deploy "$name" --trigger-topic "$topic" --runtime python37 --entry-point main --service-account "$service_account" --region "$region" --timeout 60 --memory 128MB # --vpc-connector "$vpc_connector"

0 commit comments

Comments
 (0)