github.com/nbering/terraform@v0.8.5-0.20170113232247-453f670684b5/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 their Rancher API ID, e.g.
    43  
    44  ```
    45  $ terraform import rancher_registration_token.dev_token 1c11
    46  ```