Skip to content

Commit

Permalink
Merge pull request #1514 from api3dao/v0.9-fix-secrets-quotation
Browse files Browse the repository at this point in the history
[v0.9] Fix handling of quotation marks in secrets
  • Loading branch information
amarthadan authored Oct 31, 2022
2 parents a2e7a03 + 1826e56 commit 4f9fb08
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-rivers-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@api3/airnode-deployer': patch
---

Fix handling of quotation marks in secrets
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "aws_lambda_function" "lambda" {
environment {
variables = merge(
var.environment_variables,
fileexists(var.secrets_file) ? { for tuple in regexall("(.*?)=(.*)", file(var.secrets_file)) : tuple[0] => tuple[1] } : {},
fileexists(var.secrets_file) ? { for tuple in regexall("(.*?)=(.*)", file(var.secrets_file)) : tuple[0] => trim(tuple[1], "\"'") } : {},
{ AIRNODE_CLOUD_PROVIDER = "aws" }
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "google_cloudfunctions_function" "function" {
max_instances = var.max_instances
environment_variables = merge(
var.environment_variables,
fileexists(var.secrets_file) ? { for tuple in regexall("(.*?)=(.*)", file(var.secrets_file)) : tuple[0] => tuple[1] } : {},
fileexists(var.secrets_file) ? { for tuple in regexall("(.*?)=(.*)", file(var.secrets_file)) : tuple[0] => trim(tuple[1], "\"'") } : {},
{ AIRNODE_CLOUD_PROVIDER = "gcp" }
)
service_account_email = google_service_account.function_service_account.email
Expand Down

0 comments on commit 4f9fb08

Please sign in to comment.