AWS CLI secretsmanager
シークレットの登録
code:bash
$ aws secretsmanager create-secret \
--name MyTestSecret \
--description "My test secret created with the CLI." \
--secret-string "{\"user\":\"diegor\",\"password\":\"EXAMPLE-PASSWORD\"}"
シークレット上書き
code:bash
$ cat test.json
{
"add1": "add1",
"add2": "add2"
}
$ aws secretsmanager put-secret-value --secret-id MyTestSecret --secret-string file://test.json
シークレット更新
code:bash
$ cat test.json
{
"add1": "add001",
"add2": "add2",
"add3": "add3"
}
$ aws secretsmanager update-secret --secret-id MyTestSecret --secret-string file://test.json