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.

Container Registry


Defined insandbox.hcl

The container_registry resource configures additional Docker registries for use with image caching and container management. This allows you to authenticate against private registries and configure custom registry endpoints.

resource "container_registry" "private" {
hostname = "my-registry.company.com"
auth {
username = "myuser"
password = "mypassword"
}
}
resource "container_registry" "private" {
hostname = "my-registry.company.com"
auth {
hostname = "auth.company.com"
username = "service-account"
password = var.registry_password
}
}

Fields

FieldTypeRequiredDescription
hostnamestringHostname of the container registry
authblockAuthentication credentials for the registry

Auth

container_registryAuth

Authentication credentials for the registry

FieldTypeRequiredDescription
hostnamestringHostname for authentication
usernamestringUsername for authentication
passwordstringPassword for authentication
Field Type Description
meta.id string Full resource identifier
meta.type string Resource type (always "container_registry")
meta.name string Resource name

Authentication configuration for the registry.

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" "dockerhub" {
hostname = "registry.hub.docker.com"
auth {
username = "mydockerhubuser"
password = var.dockerhub_password
}
}
resource "container_registry" "corporate" {
hostname = "registry.corp.example.com"
auth {
hostname = "auth.corp.example.com"
username = "service-bot"
password = var.corporate_registry_token
}
}