File tree Expand file tree Collapse file tree 10 files changed +34
-17
lines changed Expand file tree Collapse file tree 10 files changed +34
-17
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ export DB_PASS='<DB_PASSWORD>'
42
42
export DB_NAME=' <DB_NAME>'
43
43
```
44
44
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
45
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
45
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
46
+ help keep secrets safe.
46
47
47
48
Then use this command to launch the proxy in the background:
48
49
``` bash
@@ -59,7 +60,8 @@ $env:DB_PASS="<DB_PASSWORD>"
59
60
$env:DB_NAME="<DB_NAME>"
60
61
```
61
62
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
62
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
63
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
64
+ help keep secrets safe.
63
65
64
66
Then use this command to launch the proxy in a separate PowerShell session:
65
67
``` powershell
@@ -92,7 +94,8 @@ export DB_PASS='<DB_PASSWORD>'
92
94
export DB_NAME=' <DB_NAME>'
93
95
```
94
96
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
95
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
97
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
98
+ help keep secrets safe.
96
99
97
100
Then use this command to launch the proxy in the background:
98
101
``` bash
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ beta_settings:
29
29
cloud_sql_instances : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>=tcp:<PORT>
30
30
31
31
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
32
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
32
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
33
+ # secrets secret.
33
34
env_variables :
34
35
CLOUD_SQL_CONNECTION_NAME : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>
35
36
DB_USER : my-db-user
Original file line number Diff line number Diff line change 15
15
runtime : python37
16
16
17
17
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
18
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
18
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
19
+ # secrets secret.
19
20
env_variables :
20
21
CLOUD_SQL_CONNECTION_NAME : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>
21
22
DB_USER : my-db-user
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ def init_connection_engine():
62
62
def init_tcp_connection_engine (db_config ):
63
63
# [START cloud_sql_mysql_sqlalchemy_create_tcp]
64
64
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
65
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
65
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
66
+ # secrets secret.
66
67
db_user = os .environ ["DB_USER" ]
67
68
db_pass = os .environ ["DB_PASS" ]
68
69
db_name = os .environ ["DB_NAME" ]
@@ -96,7 +97,8 @@ def init_tcp_connection_engine(db_config):
96
97
def init_unix_connection_engine (db_config ):
97
98
# [START cloud_sql_mysql_sqlalchemy_create_socket]
98
99
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
99
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
100
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
101
+ # secrets secret.
100
102
db_user = os .environ ["DB_USER" ]
101
103
db_pass = os .environ ["DB_PASS" ]
102
104
db_name = os .environ ["DB_NAME" ]
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ export DB_PASS='<DB_PASSWORD>'
41
41
export DB_NAME=' <DB_NAME>'
42
42
```
43
43
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
44
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
44
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
45
+ help keep secrets safe.
45
46
46
47
Then use this command to launch the proxy in the background:
47
48
``` bash
@@ -58,7 +59,8 @@ $env:DB_PASS="<DB_PASSWORD>"
58
59
$env:DB_NAME="<DB_NAME>"
59
60
```
60
61
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
61
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
62
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
63
+ help keep secrets safe.
62
64
63
65
Then use this command to launch the proxy in a separate PowerShell session:
64
66
``` powershell
@@ -90,7 +92,8 @@ export DB_PASS='<DB_PASSWORD>'
90
92
export DB_NAME=' < DB_NAME> '
91
93
```
92
94
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
93
- secure solution such as [Cloud KMS](https://cloud.google.com/kms/) to help keep secrets safe.
95
+ secure solution such as [Secret Manager](https://cloud.google.com/secret-manager/docs/overview) to
96
+ help keep secrets safe.
94
97
95
98
Then use this command to launch the proxy in the background:
96
99
```bash
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ beta_settings:
29
29
cloud_sql_instances : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>=tcp:<PORT>
30
30
31
31
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
32
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
32
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
33
+ # secrets secret.
33
34
env_variables :
34
35
CLOUD_SQL_CONNECTION_NAME : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>
35
36
DB_USER : my-db-user
Original file line number Diff line number Diff line change 15
15
runtime : python37
16
16
17
17
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
18
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
18
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
19
+ # secrets secret.
19
20
env_variables :
20
21
CLOUD_SQL_CONNECTION_NAME : <MY-PROJECT>:<INSTANCE-REGION>:<MY-DATABASE>
21
22
DB_USER : my-db-user
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ def init_connection_engine():
65
65
def init_tcp_connection_engine (db_config ):
66
66
# [START cloud_sql_postgres_sqlalchemy_create_tcp]
67
67
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
68
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
68
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
69
+ # secrets secret.
69
70
db_user = os .environ ["DB_USER" ]
70
71
db_pass = os .environ ["DB_PASS" ]
71
72
db_name = os .environ ["DB_NAME" ]
@@ -99,7 +100,8 @@ def init_tcp_connection_engine(db_config):
99
100
def init_unix_connection_engine (db_config ):
100
101
# [START cloud_sql_postgres_sqlalchemy_create_socket]
101
102
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
102
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
103
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
104
+ # secrets secret.
103
105
db_user = os .environ ["DB_USER" ]
104
106
db_pass = os .environ ["DB_PASS" ]
105
107
db_name = os .environ ["DB_NAME" ]
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ export DB_NAME='my_db'
46
46
export DB_HOST=' 127.0.0.1:1433'
47
47
```
48
48
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
49
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
49
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
50
+ help keep secrets safe.
50
51
51
52
Then, use the following command to start the proxy in the background using TCP:
52
53
``` bash
@@ -64,7 +65,8 @@ $env:DB_NAME="my_db"
64
65
$env:DB_HOST="127.0.0.1:1433"
65
66
```
66
67
Note: Saving credentials in environment variables is convenient, but not secure - consider a more
67
- secure solution such as [ Cloud KMS] ( https://cloud.google.com/kms/ ) to help keep secrets safe.
68
+ secure solution such as [ Secret Manager] ( https://cloud.google.com/secret-manager/docs/overview ) to
69
+ help keep secrets safe.
68
70
69
71
Then use this command to launch the proxy in a separate PowerShell session:
70
72
``` powershell
Original file line number Diff line number Diff line change 33
33
def init_tcp_connection_engine ():
34
34
# [START cloud_sql_server_sqlalchemy_create_tcp]
35
35
# Remember - storing secrets in plaintext is potentially unsafe. Consider using
36
- # something like https://cloud.google.com/kms/ to help keep secrets secret.
36
+ # something like https://cloud.google.com/secret-manager/docs/overview to help keep
37
+ # secrets secret.
37
38
db_user = os .environ ["DB_USER" ]
38
39
db_pass = os .environ ["DB_PASS" ]
39
40
db_name = os .environ ["DB_NAME" ]
You can’t perform that action at this time.
0 commit comments