1.4 KiB
1.4 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
rancher | Rancher: rancher_registration_token | docs-rancher-resource-registration-token | Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information. |
rancher_registration_token
Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information.
Example Usage
# Create a new Rancher registration token
resource "rancher_registration_token" "default" {
name = "staging_token"
description = "Registration token for the staging environment"
environment_id = "${rancher_environment.default.id}"
}
Argument Reference
The following arguments are supported:
name
- (Required) The name of the registration token.description
- (Optional) A registration token description.environment_id
- (Required) The ID of the environment to create the token for.
Attributes Reference
The following attributes are exported:
command
- The command used to start a rancher agent for this environment.registration_url
- The URL to use to register new nodes to the environment.token
- The token to use to register new nodes to the environment.
Import
Registration tokens can be imported using their Rancher API ID, e.g.
$ terraform import rancher_registration_token.dev_token 1c11