1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getContainerRegistry
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getContainerRegistry

Explore with Pulumi AI

The Container Registry data source can be used to search for and return an existing Container Registry. You can provide a string for the name parameter which will be compared with provisioned Container Registry. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search and make sure that your resources have unique names.

Example Usage

By Id

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = ionoscloud.getContainerRegistry({
    id: "registry_id",
});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.get_container_registry(id="registry_id")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ionoscloud.LookupContainerRegistry(ctx, &ionoscloud.LookupContainerRegistryArgs{
			Id: pulumi.StringRef("registry_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = Ionoscloud.GetContainerRegistry.Invoke(new()
    {
        Id = "registry_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetContainerRegistryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = IonoscloudFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
            .id("registry_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ionoscloud:getContainerRegistry
      arguments:
        id: registry_id
Copy

By Name

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = ionoscloud.getContainerRegistry({
    name: "container-registry-example",
});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.get_container_registry(name="container-registry-example")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ionoscloud.LookupContainerRegistry(ctx, &ionoscloud.LookupContainerRegistryArgs{
			Name: pulumi.StringRef("container-registry-example"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = Ionoscloud.GetContainerRegistry.Invoke(new()
    {
        Name = "container-registry-example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetContainerRegistryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = IonoscloudFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
            .name("container-registry-example")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ionoscloud:getContainerRegistry
      arguments:
        name: container-registry-example
Copy

By Name with Partial Match

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = ionoscloud.getContainerRegistry({
    name: "-example",
    partialMatch: true,
});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.get_container_registry(name="-example",
    partial_match=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ionoscloud.LookupContainerRegistry(ctx, &ionoscloud.LookupContainerRegistryArgs{
			Name:         pulumi.StringRef("-example"),
			PartialMatch: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = Ionoscloud.GetContainerRegistry.Invoke(new()
    {
        Name = "-example",
        PartialMatch = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetContainerRegistryArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = IonoscloudFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
            .name("-example")
            .partialMatch(true)
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ionoscloud:getContainerRegistry
      arguments:
        name: -example
        partialMatch: true
Copy

Using getContainerRegistry

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getContainerRegistry(args: GetContainerRegistryArgs, opts?: InvokeOptions): Promise<GetContainerRegistryResult>
function getContainerRegistryOutput(args: GetContainerRegistryOutputArgs, opts?: InvokeOptions): Output<GetContainerRegistryResult>
Copy
def get_container_registry(id: Optional[str] = None,
                           location: Optional[str] = None,
                           name: Optional[str] = None,
                           partial_match: Optional[bool] = None,
                           timeouts: Optional[GetContainerRegistryTimeouts] = None,
                           opts: Optional[InvokeOptions] = None) -> GetContainerRegistryResult
def get_container_registry_output(id: Optional[pulumi.Input[str]] = None,
                           location: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           partial_match: Optional[pulumi.Input[bool]] = None,
                           timeouts: Optional[pulumi.Input[GetContainerRegistryTimeoutsArgs]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetContainerRegistryResult]
Copy
func LookupContainerRegistry(ctx *Context, args *LookupContainerRegistryArgs, opts ...InvokeOption) (*LookupContainerRegistryResult, error)
func LookupContainerRegistryOutput(ctx *Context, args *LookupContainerRegistryOutputArgs, opts ...InvokeOption) LookupContainerRegistryResultOutput
Copy

> Note: This function is named LookupContainerRegistry in the Go SDK.

public static class GetContainerRegistry 
{
    public static Task<GetContainerRegistryResult> InvokeAsync(GetContainerRegistryArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerRegistryResult> Invoke(GetContainerRegistryInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetContainerRegistryResult> getContainerRegistry(GetContainerRegistryArgs args, InvokeOptions options)
public static Output<GetContainerRegistryResult> getContainerRegistry(GetContainerRegistryArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ionoscloud:index/getContainerRegistry:getContainerRegistry
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
ID of the container registry you want to search for.
Location string
Name string
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
PartialMatch bool

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Timeouts GetContainerRegistryTimeouts
Id string
ID of the container registry you want to search for.
Location string
Name string
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
PartialMatch bool

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Timeouts GetContainerRegistryTimeouts
id String
ID of the container registry you want to search for.
location String
name String
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
partialMatch Boolean

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

timeouts GetContainerRegistryTimeouts
id string
ID of the container registry you want to search for.
location string
name string
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
partialMatch boolean

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

timeouts GetContainerRegistryTimeouts
id str
ID of the container registry you want to search for.
location str
name str
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
partial_match bool

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

timeouts GetContainerRegistryTimeouts
id String
ID of the container registry you want to search for.
location String
name String
Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if partial_match parameter is not set to true.
partialMatch Boolean

Whether partial matching is allowed or not when using name argument. Default value is false.

Either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

timeouts Property Map

getContainerRegistry Result

The following output properties are available:

ApiSubnetAllowLists List<string>
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
Features List<GetContainerRegistryFeature>
GarbageCollectionSchedules List<GetContainerRegistryGarbageCollectionSchedule>
Hostname string
Id string
Id of the container registry.
MaintenanceWindows List<GetContainerRegistryMaintenanceWindow>
Name string
The name of the container registry.
StorageUsages List<GetContainerRegistryStorageUsage>
Location string
PartialMatch bool
Timeouts GetContainerRegistryTimeouts
ApiSubnetAllowLists []string
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
Features []GetContainerRegistryFeature
GarbageCollectionSchedules []GetContainerRegistryGarbageCollectionSchedule
Hostname string
Id string
Id of the container registry.
MaintenanceWindows []GetContainerRegistryMaintenanceWindow
Name string
The name of the container registry.
StorageUsages []GetContainerRegistryStorageUsage
Location string
PartialMatch bool
Timeouts GetContainerRegistryTimeouts
apiSubnetAllowLists List<String>
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
features List<GetContainerRegistryFeature>
garbageCollectionSchedules List<GetContainerRegistryGarbageCollectionSchedule>
hostname String
id String
Id of the container registry.
maintenanceWindows List<GetContainerRegistryMaintenanceWindow>
name String
The name of the container registry.
storageUsages List<GetContainerRegistryStorageUsage>
location String
partialMatch Boolean
timeouts GetContainerRegistryTimeouts
apiSubnetAllowLists string[]
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
features GetContainerRegistryFeature[]
garbageCollectionSchedules GetContainerRegistryGarbageCollectionSchedule[]
hostname string
id string
Id of the container registry.
maintenanceWindows GetContainerRegistryMaintenanceWindow[]
name string
The name of the container registry.
storageUsages GetContainerRegistryStorageUsage[]
location string
partialMatch boolean
timeouts GetContainerRegistryTimeouts
api_subnet_allow_lists Sequence[str]
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
features Sequence[GetContainerRegistryFeature]
garbage_collection_schedules Sequence[GetContainerRegistryGarbageCollectionSchedule]
hostname str
id str
Id of the container registry.
maintenance_windows Sequence[GetContainerRegistryMaintenanceWindow]
name str
The name of the container registry.
storage_usages Sequence[GetContainerRegistryStorageUsage]
location str
partial_match bool
timeouts GetContainerRegistryTimeouts
apiSubnetAllowLists List<String>
The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
features List<Property Map>
garbageCollectionSchedules List<Property Map>
hostname String
id String
Id of the container registry.
maintenanceWindows List<Property Map>
name String
The name of the container registry.
storageUsages List<Property Map>
location String
partialMatch Boolean
timeouts Property Map

Supporting Types

GetContainerRegistryFeature

VulnerabilityScanning This property is required. bool
VulnerabilityScanning This property is required. bool
vulnerabilityScanning This property is required. Boolean
vulnerabilityScanning This property is required. boolean
vulnerability_scanning This property is required. bool
vulnerabilityScanning This property is required. Boolean

GetContainerRegistryGarbageCollectionSchedule

Days This property is required. List<string>
Time This property is required. string
Days This property is required. []string
Time This property is required. string
days This property is required. List<String>
time This property is required. String
days This property is required. string[]
time This property is required. string
days This property is required. Sequence[str]
time This property is required. str
days This property is required. List<String>
time This property is required. String

GetContainerRegistryMaintenanceWindow

Days This property is required. List<string>
Time This property is required. string
Days This property is required. []string
Time This property is required. string
days This property is required. List<String>
time This property is required. String
days This property is required. string[]
time This property is required. string
days This property is required. Sequence[str]
time This property is required. str
days This property is required. List<String>
time This property is required. String

GetContainerRegistryStorageUsage

Bytes This property is required. double
UpdatedAt This property is required. string
Bytes This property is required. float64
UpdatedAt This property is required. string
bytes This property is required. Double
updatedAt This property is required. String
bytes This property is required. number
updatedAt This property is required. string
bytes This property is required. float
updated_at This property is required. str
bytes This property is required. Number
updatedAt This property is required. String

GetContainerRegistryTimeouts

Create string
Default string
Delete string
Update string
Create string
Default string
Delete string
Update string
create String
default_ String
delete String
update String
create string
default string
delete string
update string
create String
default String
delete String
update String

Package Details

Repository
ionoscloud ionos-cloud/terraform-provider-ionoscloud
License
Notes
This Pulumi package is based on the ionoscloud Terraform Provider.