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",
});
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. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Timeouts
Get
Container Registry Timeouts
- 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. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Timeouts
Get
Container Registry Timeouts
- 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. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Container Registry Timeouts
- 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. - partial
Match boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Container Registry Timeouts
- 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
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts
Get
Container Registry Timeouts
- 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. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- timeouts Property Map
getContainerRegistry Result
The following output properties are available:
- Api
Subnet List<string>Allow Lists - 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<Get
Container Registry Feature> - Garbage
Collection List<GetSchedules Container Registry Garbage Collection Schedule> - Hostname string
- Id string
- Id of the container registry.
- Maintenance
Windows List<GetContainer Registry Maintenance Window> - Name string
- The name of the container registry.
- Storage
Usages List<GetContainer Registry Storage Usage> - Location string
- Partial
Match bool - Timeouts
Get
Container Registry Timeouts
- Api
Subnet []stringAllow Lists - 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
[]Get
Container Registry Feature - Garbage
Collection []GetSchedules Container Registry Garbage Collection Schedule - Hostname string
- Id string
- Id of the container registry.
- Maintenance
Windows []GetContainer Registry Maintenance Window - Name string
- The name of the container registry.
- Storage
Usages []GetContainer Registry Storage Usage - Location string
- Partial
Match bool - Timeouts
Get
Container Registry Timeouts
- api
Subnet List<String>Allow Lists - 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<Get
Container Registry Feature> - garbage
Collection List<GetSchedules Container Registry Garbage Collection Schedule> - hostname String
- id String
- Id of the container registry.
- maintenance
Windows List<GetContainer Registry Maintenance Window> - name String
- The name of the container registry.
- storage
Usages List<GetContainer Registry Storage Usage> - location String
- partial
Match Boolean - timeouts
Get
Container Registry Timeouts
- api
Subnet string[]Allow Lists - 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
Get
Container Registry Feature[] - garbage
Collection GetSchedules Container Registry Garbage Collection Schedule[] - hostname string
- id string
- Id of the container registry.
- maintenance
Windows GetContainer Registry Maintenance Window[] - name string
- The name of the container registry.
- storage
Usages GetContainer Registry Storage Usage[] - location string
- partial
Match boolean - timeouts
Get
Container Registry Timeouts
- api_
subnet_ Sequence[str]allow_ lists - 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[Get
Container Registry Feature] - garbage_
collection_ Sequence[Getschedules Container Registry Garbage Collection Schedule] - hostname str
- id str
- Id of the container registry.
- maintenance_
windows Sequence[GetContainer Registry Maintenance Window] - name str
- The name of the container registry.
- storage_
usages Sequence[GetContainer Registry Storage Usage] - location str
- partial_
match bool - timeouts
Get
Container Registry Timeouts
- api
Subnet List<String>Allow Lists - 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>
- garbage
Collection List<Property Map>Schedules - hostname String
- id String
- Id of the container registry.
- maintenance
Windows List<Property Map> - name String
- The name of the container registry.
- storage
Usages List<Property Map> - location String
- partial
Match Boolean - timeouts Property Map
Supporting Types
GetContainerRegistryFeature
- vulnerability
Scanning Boolean
- vulnerability
Scanning boolean
- vulnerability
Scanning Boolean
GetContainerRegistryGarbageCollectionSchedule
GetContainerRegistryMaintenanceWindow
GetContainerRegistryStorageUsage
- bytes float
- updated_
at str
GetContainerRegistryTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.