Instructions for retrieving and copying the connection details needed to access your Vultr Container Registry
Retrieving Connection Details for Vultr Container Registry provides essential information, including endpoints and credentials, for seamless integration and secure access. This allows you to effectively manage and deploy container images across your applications. Vultr Container Registry ensures that you have the necessary details to connect and work with your container registry efficiently.
Follow this guide to retrieve the connection details of your container registry on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.
Navigate to Products and click Container Registry.
Select your target registry to open its management page.
In the overview page, copy the registry connection details such as Registry URL, Username and API Key.
Send a GET
request to the List Container Registries endpoint and note the target registry's ID.
$ curl "https://api.vultr.com/v2/registries" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the Read Container Registry endpoint and note the connection details for your target registry.
$ curl "https://api.vultr.com/v2/registry/{registry-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List all available registries in your Vultr account and note the target registry's ID.
$ vultr-cli container-registry list
Get the target registry and note the connection details.
$ vultr-cli container-registry get <registry-id>
Ensure the Vultr Terraform provider is configured in your Terraform project.
Define the Container Registry data source (filter by name), then apply.
terraform {
required_providers {
vultr = {
source = "vultr/vultr"
version = "~> 2.27"
}
}
}
provider "vultr" {}
data "vultr_container_registry" "registry" {
filter {
name = "name"
values = ["container-registry"]
}
}
# Output the connection details
output "registry_name" {
value = data.vultr_container_registry.registry.name
}
output "registry_urn" {
value = data.vultr_container_registry.registry.urn
}
output "registry_date_created" {
value = data.vultr_container_registry.registry.date_created
}
output "registry_public" {
value = data.vultr_container_registry.registry.public
}
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
registry_date_created = "2025-01-01 10:00:00"
registry_name = "existingregistry"
registry_public = false
registry_urn = "sgp.vultrcr.com/existingregistry"
No comments yet.