Skip to content

Commit 664e12d

Browse files
authored
Merge pull request #7 from Aguafrommars/user/ole
feat: allow providing store keys
2 parents b408d93 + afe62ba commit 664e12d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ locals {
211211
}
212212
dataProtection = {
213213
create = false
214-
crt = "${base64encode(tls_locally_signed_cert.data_protection.cert_pem)}"
215-
key = "${base64encode(tls_private_key.data_protection_private_key.private_key_pem)}"
214+
crt = fileexists("data_protection.pem") ? "${base64encode(file("data_protection.pem"))}" : "${base64encode(tls_locally_signed_cert.data_protection.cert_pem)}"
215+
key = fileexists("data_protection_private_key.pem") ? "${base64encode(file("data_protection_private_key.pem"))}" : "${base64encode(tls_private_key.data_protection_private_key.private_key_pem)}"
216216
}
217217
signingKey = {
218218
create = false
219-
crt = "${base64encode(tls_locally_signed_cert.signing_key.cert_pem)}"
220-
key = "${base64encode(tls_private_key.signing_key_private_key.private_key_pem)}"
219+
crt = fileexists("signing_key.pem") ? "${base64encode(file("signing_key.pem"))}" : "${base64encode(tls_locally_signed_cert.signing_key.cert_pem)}"
220+
key = fileexists("signing_key_private_key.pem") ? "${base64encode(file("signing_key_private_key.pem"))}" : "${base64encode(tls_private_key.signing_key_private_key.private_key_pem)}"
221221
}
222222
mysql = {
223223
architecture = "replication"

0 commit comments

Comments
 (0)