0

現在、キーのプロバイダーとして SSM を使用して confd POC をセットアップしようとしています。現在、AWS にはルート アカウントである 1 つのアカウントと、環境を分離するための複数のロールがあります。

現在、私のAWS設定はそのように見えます

[default]
region=eu-west-1
output=json
role_arn=arn:aws:iam::*:role/OrganizationAccountAccessRole

コマンドを指定すると、これは私にとって非常にうまく機能します

aws ssm get-parameters --names /eric

この poc 用に作成したキーを返してください

PARAMETERS  arn:aws:ssm:eu-west-1:*:parameter/eric * /eric  String  test    1

confdの場合はそうではありませんが

confd -onetime -backend ssm --log-level debug

2019-04-07T18:25:08Z 3ce95f057568 confd[359]: DEBUG Processing key=/eric
2019-04-07T18:25:08Z 3ce95f057568 confd[359]: DEBUG Got the following map from store: map[]
2019-04-07T18:25:08Z 3ce95f057568 confd[359]: DEBUG Using source template /etc/confd/templates/myconfig.conf.tmpl
2019-04-07T18:25:08Z 3ce95f057568 confd[359]: DEBUG Compiling source template /etc/confd/templates/myconfig.conf.tmpl
2019-04-07T18:25:08Z 3ce95f057568 confd[359]: ERROR template: myconfig.conf.tmpl:2:17: executing "myconfig.conf.tmpl" at <getv "/eric">: error calling getv: key does not exist: /eric
2019-04-07T18:25:08Z 3ce95f057568 confd[359]: FATAL template: myconfig.conf.tmpl:2:17: executing "myconfig.conf.tmpl" at <getv "/eric">: error calling getv: key does not exist: /eric

短いテストを 1 回実行し、ロール アカウントではなくルート アカウントにキー /eric を作成しました。それを実行した後、期待どおりに機能しました。ロールを「使用」するための confd の隠し設定があるのではないかと思います。 ? 現在は役割を考慮していないように見えるからです。

私のconfdテンプレートは次のようになります

[template]
src = "myconfig.conf.tmpl"
dest = "/tmp/myconfig.conf"
keys = [
    "/eric"
]

そして私のconfd設定は次のようになります

database_url = {{getv "/eric"}}

この特定の問題に関して誰かが私に指示を与えることができますか?

4

1 に答える 1