» rancher_registry_credential

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

» Example Usage

# Create a new Rancher registry
resource "rancher_registry_credential" "dockerhub" {
  name         = "dockerhub"
  description  = "DockerHub Registry Credential"
  registry_id  = "${rancher_registry.dockerhub.id}"
  public_value = "myself"
  secret_value = "mypass"

» Argument Reference

The following arguments are supported:

  • name - (Required) The name of the registry credential.
  • description - (Optional) A registry credential description.
  • registry_id - (Required) The ID of the registry to create the credential for.
  • public_value - (Required) The public value (user name) of the account.
  • secret_value - (Required) The secret value (password) of the account.

» Attributes Reference

  • id - (Computed) The ID of the resource.

» Import

Registry credentials can be imported using the Registry and credentials IDs in the format <registry_id>/<credential_id>

$ terraform import rancher_registry_credential.private_registry 1sp31/1c605

If the credentials for the Rancher provider have access to the global API, then then registry_id can be omitted e.g.

$ terraform import rancher_registry_credential.private_registry 1c605