Hiera-eyaml-Kms - 在木偶中使用时解密问题

时间:2017-12-15 14:00:09

标签: puppet hiera aws-kms amazon-kms

我在木偶中使用Kms密钥来解密一些秘密,我在解密秘密时会出现波纹错误

Error: Evaluation Error: Error while evaluating a Function Call, missing region; use :region option or export region name to ENV['AWS_REGION'] at /init.pp:3:18 on node

这是我的hiera配置文件,我已经配置了kms密钥ID和区域

---
:backends:
 - yaml
 - eyaml
:hierarchy:
   - "%{::osfamily}/%{::environ}/%{::appname}"

:yaml:
  :datadir: 'C:\temp\var'
:eyaml:
  :datadir: 'C:\temp\var\eyaml'
  :key_id: '<key_id>'
  :aws_region: 'eu-west-1'
  :extension: 'yaml'

我正在使用hiera-eyaml-kms-0.0.1 gem

即使我尝试在环境变量-AWO_REGION

中设置它

1 个答案:

答案 0 :(得分:0)

更改hiera.yaml中的以下内容

str=( $com "$url" )
"{str[@]}"