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

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    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",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_container_registry(id="registry_id")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getContainerRegistry
          arguments:
            id: registry_id
    

    By Name

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getContainerRegistry({
        name: "container-registry-example",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_container_registry(name="container-registry-example")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getContainerRegistry
          arguments:
            name: container-registry-example
    

    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,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_container_registry(name="-example",
        partial_match=True)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getContainerRegistry
          arguments:
            name: -example
            partialMatch: true
    

    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>
    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]
    func LookupContainerRegistry(ctx *Context, args *LookupContainerRegistryArgs, opts ...InvokeOption) (*LookupContainerRegistryResult, error)
    func LookupContainerRegistryOutput(ctx *Context, args *LookupContainerRegistryOutputArgs, opts ...InvokeOption) LookupContainerRegistryResultOutput

    > 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)
    }
    public static CompletableFuture<GetContainerRegistryResult> getContainerRegistry(GetContainerRegistryArgs args, InvokeOptions options)
    public static Output<GetContainerRegistryResult> getContainerRegistry(GetContainerRegistryArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getContainerRegistry:getContainerRegistry
      arguments:
        # arguments dictionary

    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

    GetContainerRegistryGarbageCollectionSchedule

    Days List<string>
    Time string
    Days []string
    Time string
    days List<String>
    time String
    days string[]
    time string
    days Sequence[str]
    time str
    days List<String>
    time String

    GetContainerRegistryMaintenanceWindow

    Days List<string>
    Time string
    Days []string
    Time string
    days List<String>
    time String
    days string[]
    time string
    days Sequence[str]
    time str
    days List<String>
    time String

    GetContainerRegistryStorageUsage

    Bytes double
    UpdatedAt string
    Bytes float64
    UpdatedAt string
    bytes Double
    updatedAt String
    bytes number
    updatedAt string
    bytes float
    updated_at str
    bytes Number
    updatedAt 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.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud