--- layout: "chef" page_title: "Chef: chef_data_bag_item" sidebar_current: "docs-chef-resource-data-bag-item" description: |- Creates and manages an object within a data bag in Chef Server. --- # chef_data_bag_item A [data bag](http://docs.chef.io/data_bags.html) is a collection of configuration objects that are stored as JSON in Chef Server and can be retrieved and used in Chef recipes. This resource creates objects within an existing data bag. To create the data bag itself, use the ``chef_data_bag`` resource. ## Example Usage ```hcl resource "chef_data_bag_item" "example" { data_bag_name = "example-data-bag" content_json = <