File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
gcp_cloud_function_sql_export Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 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
816set -euo pipefail
917[ -n " ${DEBUG:- } " ] && set -x
@@ -17,6 +25,9 @@ region="europe-west3" # not available in all regions yet
1725name=" cloud-sql-backups"
1826topic=" cloud-sql-backups"
1927service_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"
You can’t perform that action at this time.
0 commit comments