I have a recipe that uses the file resource to grant an active directory group access to a local folder.
I don't have access to AD from my Chef workstation where I am running test kitchen.
I want to be able to converge the kitchen vm (not just spec tests).
So I was planning to use environments
Is this an appropriate use of environments? Is there another Chef mechanism for this purpose?
For this kind of case what I would do is using the cookbook attributes for the default (testing) case.
Then as per attribute precedence documentation environment attributes will replace the cookbook attributes (at the same level) so in real world case you'll set the AD group in environment.
This allow a per environment group to be used.
Caution: any change to the environment will impact all nodes, you'll have to write a wrapper cookbook with an upper level (usually override) if you want to change it for only a subset of an environment's nodes.