Add bug fix to allow to use Secret Manager secrets to mount files in Cloud Function

This commit is contained in:
Luigi Bitonti 2023-09-25 14:51:00 +02:00
parent f2cd57a4b7
commit 15b7215f61
2 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,8 @@ resource "google_cloudfunctions_function" "function" {
for_each = secret.value.versions
iterator = version
content {
path = split(":", version)[1]
version = split(":", version)[0]
path = split(":", version.value)[1]
version = split(":", version.value)[0]
}
}
}

View File

@ -133,8 +133,8 @@ resource "google_cloudfunctions2_function" "function" {
for_each = secret.value.versions
iterator = version
content {
path = split(":", version)[1]
version = split(":", version)[0]
path = split(":", version.value)[1]
version = split(":", version.value)[0]
}
}
}