terraform/website/source/docs/providers/chef/r/environment.html.markdown

1.3 KiB

layout page_title sidebar_current description
chef Chef: chef_environment docs-chef-resource-environment Creates and manages an environment in Chef Server.

chef_environment

An environment is a container for Chef nodes that share a set of attribute values and may have a set of version constraints for which cookbook versions may be used on its nodes.

Example Usage

resource "chef_environment" "example" {
    name = "example-environment"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The unique name to assign to the environment. This name will be used when nodes are created within the environment.
  • description - (Optional) A human-friendly description of the environment. If not set, a placeholder of "Managed by Terraform" will be set.
  • default_attributes_json - (Optional) String containing a JSON-serialized object containing the default attributes for the environment.
  • override_attributes_json - (Optional) String containing a JSON-serialized object containing the override attributes for the environment.
  • cookbook_constraints - (Optional) Mapping of cookbook names to cookbook version constraints that should apply for this environment.

Attributes Reference

This resource exports no further attributes.