Sunil
Sunil

Reputation: 581

chef-vault requires Ruby version >= 2.2.0 | Error using with Terraform

Am using Terraform to spin up instances in Openstack and use the chef provisioner for bootstrap my node to chef in terraform code. I do have a Chef vault where i put my secrets. But

terraform apply

is giving the below error

openstack_compute_floatingip_associate_v2.node.0 (chef): chef-vault requires Ruby version >= 2.2.0.

Please find the code snippet below:

provisioner "chef" {

      node_name = "test${format("0%03d", count.index+1)}"
      environment = "${var.environment}"
      run_list = ["role[dev_default]"]
      version = "${var.chef-client_version}"
      recreate_client = true
      server_url = "${var.chef001_server}/organizations/${var.chef_org}"
      user_name = "${var.chef_username}"
      user_key = "${var.chef_user_key}"
      vault_json = "${file("scripts/vault.json")}
}

It would be great to some insights on the same?

Regards, Sunil

Upvotes: 1

Views: 328

Answers (1)

coderanger
coderanger

Reputation: 54251

Answered via comments, user was using a very old version of Chef which is incompatible with current vault.

Upvotes: 1

Related Questions