Chef-Vault and 160+ nodes gives errors via Terraform Creation

So we’ve got a terraform that bootstraps up 160+ nodes, those nodes get added to a chef-vault client list. The nodes have admin access to the vault. However we get the following error intermittently during the run.
ERROR: Chef::EncryptedDataBagItem::DecryptionFailure: Error decrypting data bag value:

But when we say taint one node, or just a few nodes it works. Has anyone dealt with something similar and solved? Its been a head scratcher for awhile.

Thanks in advance

1 Like

You can get race conditions if many nodes are being bootstrapped (and hence all writing to the data bag) at once. Chef Vault sparse mode would solve this but I’m not sure terraform has implemented that yet.

1 Like

I’ll do some digging on that right now and see. Thank you for the info, I’ll keep you posted.