During knife ec2 I am specifying a ClientID attribute which I would like to reference in a data bag, only I would like to add to the bag name so it is not exactly the ID. This works fine for the exact ID:
data_bag(node['clientid']).each do |tenant|
tenantdata = data_bag_item(node['clientid'], tenant)
tenantname = tenantdata["id"]
But I am trying for something like this (which does not work)
data_bag(node['clientid']"_tenants").each do |tenant|
tenantdata = data_bag_item(node['ctc_clientid']"_tenants", tenant)
tenantname = tenantdata["id"]
So that if the ClientID = abcd, the reference would be "abcd_tenants". Is there a solution which lets me do this without passing a separate json attribute for the data bag?