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