我已经用生成器配置了 SOPS:
.sops.yaml
creation_rules:
- path_regex: \.dev\.yaml$
kms: *kms_arn*
aws_profile: dev
生成文件
sops secrets.dev.yaml
它生成加密文件为:
hello: ENC[AES256_GCM,data:8gtnzBNu2AG9l2zHFy3ovCS0gWFj3bdjgb3B/X8CUkvgox8GcxLQv/99aMUndQ==,iv:lw8VYzpWQUrm6bWQgJ6/KEYizhe8VxJAmdysF+Q6zTM=,tag:vRrdCo/iH4ec4dPzI7DB5Q==,type:str]
sops:
kms:
- arn: *kms_arn*
created_at: '2021-01-12T05:24:17Z'
enc: *enc_key*
aws_profile: dev
gcp_kms: []
azure_kv: []
hc_vault: []
lastmodified: "2021-01-12T05:24:43Z"
mac: *mac_key*
pgp: []
unencrypted_suffix: _unencrypted
version: 3.6.1
在 terragrunt 中使用:
terragrunt.hcl
locals {
secret_vars = yamldecode(sops_decrypt_file(find_in_parent_folders("secrets.dev.yaml")))
}
错误:
Error: Error in function call:
Call to function "sops_decrypt_file" failed: Error getting data key: 0 successful groups required, got 0.