github.com/lymingtonprecision/terraform@v0.9.9-0.20170613092852-62acef9611a9/website/source/docs/providers/rancher/r/environment.html.md (about) 1 --- 2 layout: "rancher" 3 page_title: "Rancher: rancher_environment" 4 sidebar_current: "docs-rancher-resource-environment" 5 description: |- 6 Provides a Rancher Environment resource. This can be used to create and manage environments on rancher. 7 --- 8 9 # rancher\_environment 10 11 Provides a Rancher Environment resource. This can be used to create and manage environments on rancher. 12 13 ## Example Usage 14 15 ```hcl 16 # Create a new Rancher environment 17 resource "rancher_environment" "default" { 18 name = "staging" 19 description = "The staging environment" 20 orchestration = "cattle" 21 22 member { 23 external_id = "650430" 24 external_id_type = "github_user" 25 role = "owner" 26 } 27 28 member { 29 external_id = "1234" 30 external_id_type = "github_team" 31 role = "member" 32 } 33 } 34 ``` 35 36 ## Argument Reference 37 38 The following arguments are supported: 39 40 * `name` - (Required) The name of the environment. 41 * `description` - (Optional) An environment description. 42 * `orchestration` - (Optional) Must be one of **cattle**, **swarm**, **mesos**, **windows** or **kubernetes**. This is a helper for setting the project_template_ids for the included Rancher templates. This will conflict with project_template_id setting. 43 * `project_template_id` - (Optional) This can be any valid project template ID. If this is set, then orchestration can not be. 44 * `member` - (Optional) Members to add to the environment. 45 46 ### Member Parameters Reference 47 48 A `member` takes three parameters: 49 50 * `external_id` - (Required) The external ID of the member. 51 * `external_id_type` - (Required) The external ID type of the member. 52 * `role` - (Required) The role of the member in the environment. 53 54 ## Attributes Reference 55 56 * `id` - The ID of the environment (ie `1a11`) that can be used in other Terraform resources such as Rancher Stack definitions. 57 58 ## Import 59 60 Environments can be imported using their Rancher API ID, e.g. 61 62 ``` 63 $ terraform import rancher_environment.dev 1a15 64 ```