1. Packages
  2. Ionoscloud
  3. API Docs
  4. creg
  5. Packages
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.creg.Registry

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    Manages an Container Registry on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = new ionoscloud.creg.Registry("example", {
        garbageCollectionSchedule: {
            days: [
                "Monday",
                "Tuesday",
            ],
            time: "05:19:00+00:00",
        },
        location: "de/fra",
        name: "container-registry-example",
        apiSubnetAllowLists: ["1.2.3.4/32"],
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.creg.Registry("example",
        garbage_collection_schedule={
            "days": [
                "Monday",
                "Tuesday",
            ],
            "time": "05:19:00+00:00",
        },
        location="de/fra",
        name="container-registry-example",
        api_subnet_allow_lists=["1.2.3.4/32"])
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/creg"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := creg.NewRegistry(ctx, "example", &creg.RegistryArgs{
    			GarbageCollectionSchedule: &creg.RegistryGarbageCollectionScheduleArgs{
    				Days: pulumi.StringArray{
    					pulumi.String("Monday"),
    					pulumi.String("Tuesday"),
    				},
    				Time: pulumi.String("05:19:00+00:00"),
    			},
    			Location: pulumi.String("de/fra"),
    			Name:     pulumi.String("container-registry-example"),
    			ApiSubnetAllowLists: pulumi.StringArray{
    				pulumi.String("1.2.3.4/32"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Creg.Registry("example", new()
        {
            GarbageCollectionSchedule = new Ionoscloud.Creg.Inputs.RegistryGarbageCollectionScheduleArgs
            {
                Days = new[]
                {
                    "Monday",
                    "Tuesday",
                },
                Time = "05:19:00+00:00",
            },
            Location = "de/fra",
            Name = "container-registry-example",
            ApiSubnetAllowLists = new[]
            {
                "1.2.3.4/32",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.creg.Registry;
    import com.pulumi.ionoscloud.creg.RegistryArgs;
    import com.pulumi.ionoscloud.creg.inputs.RegistryGarbageCollectionScheduleArgs;
    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) {
            var example = new Registry("example", RegistryArgs.builder()
                .garbageCollectionSchedule(RegistryGarbageCollectionScheduleArgs.builder()
                    .days(                
                        "Monday",
                        "Tuesday")
                    .time("05:19:00+00:00")
                    .build())
                .location("de/fra")
                .name("container-registry-example")
                .apiSubnetAllowLists("1.2.3.4/32")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:creg:Registry
        properties:
          garbageCollectionSchedule:
            days:
              - Monday
              - Tuesday
            time: 05:19:00+00:00
          location: de/fra
          name: container-registry-example
          apiSubnetAllowLists:
            - 1.2.3.4/32
    

    Create Registry Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Registry(name: string, args: RegistryArgs, opts?: CustomResourceOptions);
    @overload
    def Registry(resource_name: str,
                 args: RegistryArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Registry(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 location: Optional[str] = None,
                 api_subnet_allow_lists: Optional[Sequence[str]] = None,
                 features: Optional[RegistryFeaturesArgs] = None,
                 garbage_collection_schedule: Optional[RegistryGarbageCollectionScheduleArgs] = None,
                 name: Optional[str] = None)
    func NewRegistry(ctx *Context, name string, args RegistryArgs, opts ...ResourceOption) (*Registry, error)
    public Registry(string name, RegistryArgs args, CustomResourceOptions? opts = null)
    public Registry(String name, RegistryArgs args)
    public Registry(String name, RegistryArgs args, CustomResourceOptions options)
    
    type: ionoscloud:creg:Registry
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RegistryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RegistryArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RegistryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegistryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegistryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var registryResource = new Ionoscloud.Creg.Registry("registryResource", new()
    {
        Location = "string",
        ApiSubnetAllowLists = new[]
        {
            "string",
        },
        Features = new Ionoscloud.Creg.Inputs.RegistryFeaturesArgs
        {
            VulnerabilityScanning = false,
        },
        GarbageCollectionSchedule = new Ionoscloud.Creg.Inputs.RegistryGarbageCollectionScheduleArgs
        {
            Days = new[]
            {
                "string",
            },
            Time = "string",
        },
        Name = "string",
    });
    
    example, err := creg.NewRegistry(ctx, "registryResource", &creg.RegistryArgs{
    	Location: pulumi.String("string"),
    	ApiSubnetAllowLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Features: &creg.RegistryFeaturesArgs{
    		VulnerabilityScanning: pulumi.Bool(false),
    	},
    	GarbageCollectionSchedule: &creg.RegistryGarbageCollectionScheduleArgs{
    		Days: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Time: pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var registryResource = new Registry("registryResource", RegistryArgs.builder()
        .location("string")
        .apiSubnetAllowLists("string")
        .features(RegistryFeaturesArgs.builder()
            .vulnerabilityScanning(false)
            .build())
        .garbageCollectionSchedule(RegistryGarbageCollectionScheduleArgs.builder()
            .days("string")
            .time("string")
            .build())
        .name("string")
        .build());
    
    registry_resource = ionoscloud.creg.Registry("registryResource",
        location="string",
        api_subnet_allow_lists=["string"],
        features={
            "vulnerability_scanning": False,
        },
        garbage_collection_schedule={
            "days": ["string"],
            "time": "string",
        },
        name="string")
    
    const registryResource = new ionoscloud.creg.Registry("registryResource", {
        location: "string",
        apiSubnetAllowLists: ["string"],
        features: {
            vulnerabilityScanning: false,
        },
        garbageCollectionSchedule: {
            days: ["string"],
            time: "string",
        },
        name: "string",
    });
    
    type: ionoscloud:creg:Registry
    properties:
        apiSubnetAllowLists:
            - string
        features:
            vulnerabilityScanning: false
        garbageCollectionSchedule:
            days:
                - string
            time: string
        location: string
        name: string
    

    Registry Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Registry resource accepts the following input properties:

    Location string
    [string] Immutable, update forces re-creation of the resource.
    ApiSubnetAllowLists List<string>
    [list] 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 Ionoscloud.RegistryFeatures
    [Map]
    GarbageCollectionSchedule Ionoscloud.RegistryGarbageCollectionSchedule
    [Map]
    Name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    Location string
    [string] Immutable, update forces re-creation of the resource.
    ApiSubnetAllowLists []string
    [list] 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 RegistryFeaturesArgs
    [Map]
    GarbageCollectionSchedule RegistryGarbageCollectionScheduleArgs
    [Map]
    Name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    location String
    [string] Immutable, update forces re-creation of the resource.
    apiSubnetAllowLists List<String>
    [list] 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 RegistryFeatures
    [Map]
    garbageCollectionSchedule RegistryGarbageCollectionSchedule
    [Map]
    name String
    The name of the container registry. Immutable, update forces re-creation of the resource.
    location string
    [string] Immutable, update forces re-creation of the resource.
    apiSubnetAllowLists string[]
    [list] 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 RegistryFeatures
    [Map]
    garbageCollectionSchedule RegistryGarbageCollectionSchedule
    [Map]
    name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    location str
    [string] Immutable, update forces re-creation of the resource.
    api_subnet_allow_lists Sequence[str]
    [list] 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 RegistryFeaturesArgs
    [Map]
    garbage_collection_schedule RegistryGarbageCollectionScheduleArgs
    [Map]
    name str
    The name of the container registry. Immutable, update forces re-creation of the resource.
    location String
    [string] Immutable, update forces re-creation of the resource.
    apiSubnetAllowLists List<String>
    [list] 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 Property Map
    [Map]
    garbageCollectionSchedule Property Map
    [Map]
    name String
    The name of the container registry. Immutable, update forces re-creation of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Registry resource produces the following output properties:

    Hostname string
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageUsages List<Ionoscloud.RegistryStorageUsage>
    Hostname string
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageUsages []RegistryStorageUsage
    hostname String
    id String
    The provider-assigned unique ID for this managed resource.
    storageUsages List<RegistryStorageUsage>
    hostname string
    id string
    The provider-assigned unique ID for this managed resource.
    storageUsages RegistryStorageUsage[]
    hostname str
    id str
    The provider-assigned unique ID for this managed resource.
    storage_usages Sequence[RegistryStorageUsage]
    hostname String
    id String
    The provider-assigned unique ID for this managed resource.
    storageUsages List<Property Map>

    Look up Existing Registry Resource

    Get an existing Registry resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RegistryState, opts?: CustomResourceOptions): Registry
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_subnet_allow_lists: Optional[Sequence[str]] = None,
            features: Optional[RegistryFeaturesArgs] = None,
            garbage_collection_schedule: Optional[RegistryGarbageCollectionScheduleArgs] = None,
            hostname: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            storage_usages: Optional[Sequence[RegistryStorageUsageArgs]] = None) -> Registry
    func GetRegistry(ctx *Context, name string, id IDInput, state *RegistryState, opts ...ResourceOption) (*Registry, error)
    public static Registry Get(string name, Input<string> id, RegistryState? state, CustomResourceOptions? opts = null)
    public static Registry get(String name, Output<String> id, RegistryState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:creg:Registry    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiSubnetAllowLists List<string>
    [list] 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 Ionoscloud.RegistryFeatures
    [Map]
    GarbageCollectionSchedule Ionoscloud.RegistryGarbageCollectionSchedule
    [Map]
    Hostname string
    Location string
    [string] Immutable, update forces re-creation of the resource.
    Name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    StorageUsages List<Ionoscloud.RegistryStorageUsage>
    ApiSubnetAllowLists []string
    [list] 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 RegistryFeaturesArgs
    [Map]
    GarbageCollectionSchedule RegistryGarbageCollectionScheduleArgs
    [Map]
    Hostname string
    Location string
    [string] Immutable, update forces re-creation of the resource.
    Name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    StorageUsages []RegistryStorageUsageArgs
    apiSubnetAllowLists List<String>
    [list] 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 RegistryFeatures
    [Map]
    garbageCollectionSchedule RegistryGarbageCollectionSchedule
    [Map]
    hostname String
    location String
    [string] Immutable, update forces re-creation of the resource.
    name String
    The name of the container registry. Immutable, update forces re-creation of the resource.
    storageUsages List<RegistryStorageUsage>
    apiSubnetAllowLists string[]
    [list] 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 RegistryFeatures
    [Map]
    garbageCollectionSchedule RegistryGarbageCollectionSchedule
    [Map]
    hostname string
    location string
    [string] Immutable, update forces re-creation of the resource.
    name string
    The name of the container registry. Immutable, update forces re-creation of the resource.
    storageUsages RegistryStorageUsage[]
    api_subnet_allow_lists Sequence[str]
    [list] 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 RegistryFeaturesArgs
    [Map]
    garbage_collection_schedule RegistryGarbageCollectionScheduleArgs
    [Map]
    hostname str
    location str
    [string] Immutable, update forces re-creation of the resource.
    name str
    The name of the container registry. Immutable, update forces re-creation of the resource.
    storage_usages Sequence[RegistryStorageUsageArgs]
    apiSubnetAllowLists List<String>
    [list] 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 Property Map
    [Map]
    garbageCollectionSchedule Property Map
    [Map]
    hostname String
    location String
    [string] Immutable, update forces re-creation of the resource.
    name String
    The name of the container registry. Immutable, update forces re-creation of the resource.
    storageUsages List<Property Map>

    Supporting Types

    RegistryFeatures, RegistryFeaturesArgs

    VulnerabilityScanning bool

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    VulnerabilityScanning bool

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    vulnerabilityScanning Boolean

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    vulnerabilityScanning boolean

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    vulnerability_scanning bool

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    vulnerabilityScanning Boolean

    [bool] Enables or disables the Vulnerability Scanning feature for the Container Registry. To disable this feature, set the attribute to false when creating the CR resource.

    ⚠ WARNING Container Registry Vulnerability Scanning is a paid feature which is enabled by default, and cannot be turned off after activation. To disable this feature for a Container Registry, ensure vulnerability_scanning is set to false on resource creation.

    RegistryGarbageCollectionSchedule, RegistryGarbageCollectionScheduleArgs

    Days List<string>
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    Time string
    [string]
    Days []string
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    Time string
    [string]
    days List<String>
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    time String
    [string]
    days string[]
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    time string
    [string]
    days Sequence[str]
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    time str
    [string]
    days List<String>
    [list] Elements of list must have one of the values: Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday
    time String
    [string]

    RegistryStorageUsage, RegistryStorageUsageArgs

    Bytes int
    UpdatedAt string
    Bytes int
    UpdatedAt string
    bytes Integer
    updatedAt String
    bytes number
    updatedAt string
    bytes Number
    updatedAt String

    Import

    Resource Container Registry can be imported using the resource id, e.g.

    $ pulumi import ionoscloud:creg/registry:Registry mycr container_registry uuid
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud