terraform/website/source/docs/providers/rancher/r/registry.html.markdown

1.2 KiB

layout page_title sidebar_current description
rancher Rancher: rancher_registry docs-rancher-resource-registry Provides a Rancher Registy resource. This can be used to create registries for rancher environments and retrieve their information.

rancher_registry

Provides a Rancher Registy resource. This can be used to create registries for rancher environments and retrieve their information

Example Usage

# Create a new Rancher registry
resource "rancher_registry" "dockerhub" {
  name = "dockerhub"
  description = "DockerHub Registry"
  environment_id = "${rancher_environment.default.id}"
  server_address = "index.dockerhub.io"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the registry.
  • description - (Optional) A registry description.
  • environment_id - (Required) The ID of the environment to create the registry for.
  • server_address - (Required) The server address for the registry.

Attributes Reference

No further attributes are exported.

Import

Registries can be imported using their Rancher API ID, e.g.

$ terraform import rancher_registry.private_registry 1sp31