I am using Chef 12.14.60. I am trying to edit multiple times an encrypted databag. I seem to only be able to edit it when I encrypt it with a secret. After that I get this error:
ERROR: Chef::Exceptions::ValidationFailed: Option data_bag's value {"encrypted_data"=>"pyVTbbahq1IW2syF24xzsAfSZdzOwVq1vZIlr2ssp9M=\n", "iv"=>"Sk/fVdGNnTti5EW6f5o3Ow==\n", "version"=>1, "cipher"=>"aes-256-cbc"} does not match regular expression /[1]+$/
I run this to create the databag and item:
knife data bag create db123 foobar
I run this to encrypt the databag's item:
knife data bag edit db123 foobar --secret goodpassword
It works, and I see this in the output:
Encrypting data bag using provided secret.
I run this to try to edit the databag again:
knife data bag edit db123 foobar --secret goodpassword
But then I see this:
ERROR: Chef::Exceptions::ValidationFailed: Option data_bag's value {"encrypted_data"=>"4l9TyNv+987JfePFfMLdELVlDuia938kAnwrly9XW94=\n", "iv"=>"JZL76EtebsSXUeE1m5KT9w==\n", "version"=>1, "cipher"=>"aes-256-cbc"} does not match regular expression /[2]+$/
I expect to be able to edit an encrypted data bag if I supply the correct password. How do I edit the foobar item in my db123 data bag again?