github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/rancher/r/registry_credential.html.markdown (about) 1 --- 2 layout: "rancher" 3 page_title: "Rancher: rancher_registry_credential" 4 sidebar_current: "docs-rancher-resource-registry-credential" 5 description: |- 6 Provides a Rancher Registy Credential resource. This can be used to create registry credentials for rancher environments and retrieve their information. 7 --- 8 9 # rancher\_registry\_credential 10 11 Provides a Rancher Registy Credential resource. This can be used to create registry credentials for rancher environments and retrieve their information. 12 13 ## Example Usage 14 15 ```hcl 16 # Create a new Rancher registry 17 resource "rancher_registry_credential" "dockerhub" { 18 name = "dockerhub" 19 description = "DockerHub Registry Credential" 20 registry_id = "${rancher_registry.dockerhub.id}" 21 email = "myself@company.com" 22 public_value = "myself" 23 secret_value = "mypass" 24 } 25 ``` 26 27 ## Argument Reference 28 29 The following arguments are supported: 30 31 * `name` - (Required) The name of the registry credential. 32 * `description` - (Optional) A registry credential description. 33 * `registry_id` - (Required) The ID of the registry to create the credential for. 34 * `email` - (Required) The email of the account. 35 * `public_value` - (Required) The public value (user name) of the account. 36 * `secret_value` - (Required) The secret value (password) of the account. 37 38 ## Attributes Reference 39 40 No further attributes are exported. 41 42 ## Import 43 44 Registry credentials can be imported using the Registry and credentials 45 IDs in the format `<registry_id>/<credential_id>` 46 47 ``` 48 $ terraform import rancher_registry_credential.private_registry 1sp31/1c605 49 ``` 50 51 If the credentials for the Rancher provider have access to the global API, then 52 then `registry_id` can be omitted e.g. 53 54 ``` 55 $ terraform import rancher_registry_credential.private_registry 1c605 56 ```