This issue was originally opened by @partamonov as hashicorp/terraform#4581. It was migrated here as part of the provider split. The original body of the issue is below.
With current implementation all roles/data bags items/envs should be specified inside .tf file.
This mean that to use it you have to move all roles/data bags items/envs inside .tf file, but in many cases these roles/data bags items/envs are stored in repositories and better approach (or additional available) is to read from file, with file() interpolation function.
This issue was originally opened by @partamonov as hashicorp/terraform#4581. It was migrated here as part of the provider split. The original body of the issue is below.
With current implementation all roles/data bags items/envs should be specified inside .tf file.
This mean that to use it you have to move all roles/data bags items/envs inside .tf file, but in many cases these roles/data bags items/envs are stored in repositories and better approach (or additional available) is to read from file, with file() interpolation function.
chef_data_bag_item
-> content_file "file('path/to/data_bag_item.json')"chef_environment
-> content_file, should discard all other attributeschef_role
-> content_file, should discard all other attributesAlso for
chef_data_bag_item
we can usetemplate_file
to get content, but it's better to add this to documentation example.