github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/rancher/r/registration_token.html.markdown (about) 1 --- 2 layout: "rancher" 3 page_title: "Rancher: rancher_registration_token" 4 sidebar_current: "docs-rancher-resource-registration-token" 5 description: |- 6 Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information. 7 --- 8 9 # rancher\_registration\_token 10 11 Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information. 12 13 ## Example Usage 14 15 ```hcl 16 # Create a new Rancher registration token 17 resource "rancher_registration_token" "default" { 18 name = "staging_token" 19 description = "Registration token for the staging environment" 20 environment_id = "${rancher_environment.default.id}" 21 } 22 ``` 23 24 ## Argument Reference 25 26 The following arguments are supported: 27 28 * `name` - (Required) The name of the registration token. 29 * `description` - (Optional) A registration token description. 30 * `environment_id` - (Required) The ID of the environment to create the token for. 31 32 ## Attributes Reference 33 34 The following attributes are exported: 35 36 * `command` - The command used to start a rancher agent for this environment. 37 * `registration_url` - The URL to use to register new nodes to the environment. 38 * `token` - The token to use to register new nodes to the environment. 39 40 ## Import 41 42 Registration tokens can be imported using the Environment and Registration token 43 IDs in the form `<environment_id>/<registration_token_id>`. 44 45 ``` 46 $ terraform import rancher_registration_token.dev_token 1a5/1c11 47 ``` 48 49 If the credentials for the Rancher provider have access to the global API, then 50 then `environment_id` can be omitted e.g. 51 52 ``` 53 $ terraform import rancher_registration_token.dev_token 1c11 54 ```