You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ Error: Error in function call
│
│ on main.tf line 13, in module "secrets-manager-2":
│ 13: secrets = jsondecode(file("${path.module}/secrets/mongo-secret"))
│ ├────────────────
│ │ while calling jsondecode(str)
│ │ path.module is "."
│
│ Call to function "jsondecode" failed: invalid character 's'.
╵
The text was updated successfully, but these errors were encountered:
main.tf
terraform {
required_providers {
sops = {
source = "carlpett/sops"
version = "~> 0.5"
}
}
}
module "secrets-manager-2" {
source = "git::https://github.com/lgallard/terraform-aws-secrets-manager.git?ref=0.6.2"
secrets = jsondecode(file("${path.module}/secrets/mongo-secret"))
}
i have directory called,
cat secrets/mongo-secret
{
secret-kv-1 = {
description = "This is a key/value secret"
secret_key_value = {
key1 = "value1"
key2 = "value2"
}
recovery_window_in_days = 7
policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnableAllPermissions",
"Effect": "Allow",
"Principal": {
"AWS": ""
},
"Action": "secretsmanager:GetSecretValue",
"Resource": ""
}
]
}
POLICY
},
secret-kv-2 = {
description = "Another key/value secret"
secret_key_value = {
username = "user"
password = "topsecret"
}
tags = {
app = "web"
}
recovery_window_in_days = 7
policy = null
},
}
when i run plan,
│ Error: Error in function call
│
│ on main.tf line 13, in module "secrets-manager-2":
│ 13: secrets = jsondecode(file("${path.module}/secrets/mongo-secret"))
│ ├────────────────
│ │ while calling jsondecode(str)
│ │ path.module is "."
│
│ Call to function "jsondecode" failed: invalid character 's'.
╵
The text was updated successfully, but these errors were encountered: