This repository was archived by the owner on Jul 12, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -191,14 +191,14 @@ export FIREBASE_STORAGE_BUCKET="${data.google_firebase_web_app_config.default.st
191
191
export CACHE_TYPE="REDIS"
192
192
export CACHE_REDIS_HOST="${ google_redis_instance . cache . host } "
193
193
export CACHE_REDIS_PORT="${ google_redis_instance . cache . port } "
194
- export CACHE_REDIS_PASSWORD="secret://${ google_secret_manager_secret_version . redis-auth . id } "
194
+ export CACHE_REDIS_PASSWORD=var.redis_enable_auth ? "secret://${ google_secret_manager_secret_version . redis-auth . id } " : " "
195
195
196
196
export RATE_LIMIT_TYPE="REDIS"
197
197
export RATE_LIMIT_TOKENS="60"
198
198
export RATE_LIMIT_INTERVAL="1m"
199
199
export RATE_LIMIT_REDIS_HOST="${ google_redis_instance . cache . host } "
200
200
export RATE_LIMIT_REDIS_PORT="${ google_redis_instance . cache . port } "
201
- export RATE_LIMIT_REDIS_PASSWORD="secret://${ google_secret_manager_secret_version . redis-auth . id } "
201
+ export RATE_LIMIT_REDIS_PASSWORD=var.redis_enable_auth ? "secret://${ google_secret_manager_secret_version . redis-auth . id } " : " "
202
202
203
203
export CERTIFICATE_SIGNING_KEY="${ trimprefix (data. google_kms_crypto_key_version . certificate-signer-version . id , " //cloudkms.googleapis.com/v1/" )} "
204
204
export TOKEN_SIGNING_KEY="${ trimprefix (data. google_kms_crypto_key_version . token-signer-version . id , " //cloudkms.googleapis.com/v1/" )} "
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ resource "google_secret_manager_secret" "redis-auth" {
56
56
57
57
resource "google_secret_manager_secret_version" "redis-auth" {
58
58
secret = google_secret_manager_secret. redis-auth . id
59
- secret_data = google_redis_instance. cache . auth_string
59
+ secret_data = coalesce ( google_redis_instance. cache . auth_string , " unused " )
60
60
}
61
61
62
62
# Create secret for the HMAC cache keys
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ locals {
34
34
CACHE_HMAC_KEY = " secret://${ google_secret_manager_secret_version . cache-hmac-key . id } "
35
35
CACHE_REDIS_HOST = google_redis_instance.cache.host
36
36
CACHE_REDIS_PORT = google_redis_instance.cache.port
37
- CACHE_REDIS_PASSWORD = " secret://${ google_secret_manager_secret_version . redis-auth . id } "
37
+ CACHE_REDIS_PASSWORD = var.redis_enable_auth ? " secret://${ google_secret_manager_secret_version . redis-auth . id } " : " "
38
38
}
39
39
40
40
database_config = {
@@ -73,7 +73,7 @@ locals {
73
73
RATE_LIMIT_INTERVAL = " 1m"
74
74
RATE_LIMIT_REDIS_HOST = google_redis_instance.cache.host
75
75
RATE_LIMIT_REDIS_PORT = google_redis_instance.cache.port
76
- RATE_LIMIT_REDIS_PASSWORD = " secret://${ google_secret_manager_secret_version . redis-auth . id } "
76
+ RATE_LIMIT_REDIS_PASSWORD = var.redis_enable_auth ? " secret://${ google_secret_manager_secret_version . redis-auth . id } " : " "
77
77
}
78
78
79
79
signing_config = {
You can’t perform that action at this time.
0 commit comments