github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/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** or **kubernetes**. Defaults to **cattle**. 43 * `member` - (Optional) Members to add to the environment. 44 45 ### Member Parameters Reference 46 47 A `member` takes three parameters: 48 49 * `external_id` - (Required) The external ID of the member. 50 * `external_id_type` - (Required) The external ID type of the member. 51 * `role` - (Required) The role of the member in the environment. 52 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 ```