weixin_39955700
weixin_39955700
2020-12-09 00:50

Vault templating

Hello, In vault (unsealed and accessible via HTTP API using curl).

In my vault in /secret/n2 is stored key=value. Via the HTTP API I can access it (using the hashicorp doc) using http://127.0.0.1:8200/v1/secret/data/n2.

I saw on the readme array that vault don't support prefix so I did not set prefix.

I didn't success with my remco resource.


[[resource]]
  name = "Vault"
  [[resource.template]]
    src = "/etc/remco/templates/key"
    dst = "/<path>/key"
    make_directories = true
    mode = "0644"
  [resource.backend]
    [resource.backend.vault]
      node = "http://172.0.0.1:8200"
      auth_type = "token" 
      auth_token = "<my_token>"
      watch = true
      keys = ["/v1/secret/data/n2"]
      onetime = false
      interval = 1
</my_token></path>

Tried many keys (same key as in the code above without v1, or/and data or with just n2) The key template is just {{ getv("/v1/secret/data/n2") }} (modified in concordance as above).

Thank You in advance. Regards.

该提问来源于开源项目:HeavyHorst/remco

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐

换一换