Skip to content

You are viewing documentation for Instruqt 2.0 Labs - our upcoming product releasing in September 2026. For current Tracks documentation, please visitdocs.instruqt.com.

Registry Auth


The auth block configures authentication credentials for accessing private Docker registries. This is used within the container_registry resource to provide authentication details.

auth {
username = "myuser"
password = "mypassword"
}
auth {
hostname = "auth.company.com"
username = "service-account"
password = var.registry_password
}
Field Type Required Description
username string Username for authentication
password string Password for authentication
hostname string Hostname for authentication (can differ from registry hostname)
resource "container_registry" "private" {
hostname = "registry.example.com"
auth {
username = "developer"
password = "secretpassword"
}
}

Sometimes the authentication endpoint differs from the registry hostname:

resource "container_registry" "corporate" {
hostname = "images.corp.com"
auth {
hostname = "login.corp.com"
username = "service-bot"
password = var.auth_token
}
}
resource "container_registry" "secure" {
hostname = "secure-registry.com"
auth {
username = var.registry_username
password = var.registry_password
}
}