ionoscloud.ContainerRegistry
Explore with Pulumi AI
Manages an Container Registry on IonosCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = new ionoscloud.ContainerRegistry("example", {
apiSubnetAllowLists: ["1.2.3.4/32"],
garbageCollectionSchedule: {
days: [
"Monday",
"Tuesday",
],
time: "05:19:00+00:00",
},
location: "de/fra",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.ContainerRegistry("example",
api_subnet_allow_lists=["1.2.3.4/32"],
garbage_collection_schedule={
"days": [
"Monday",
"Tuesday",
],
"time": "05:19:00+00:00",
},
location="de/fra")
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.NewContainerRegistry(ctx, "example", &ionoscloud.ContainerRegistryArgs{
ApiSubnetAllowLists: pulumi.StringArray{
pulumi.String("1.2.3.4/32"),
},
GarbageCollectionSchedule: &ionoscloud.ContainerRegistryGarbageCollectionScheduleArgs{
Days: pulumi.StringArray{
pulumi.String("Monday"),
pulumi.String("Tuesday"),
},
Time: pulumi.String("05:19:00+00:00"),
},
Location: pulumi.String("de/fra"),
})
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 = new Ionoscloud.ContainerRegistry("example", new()
{
ApiSubnetAllowLists = new[]
{
"1.2.3.4/32",
},
GarbageCollectionSchedule = new Ionoscloud.Inputs.ContainerRegistryGarbageCollectionScheduleArgs
{
Days = new[]
{
"Monday",
"Tuesday",
},
Time = "05:19:00+00:00",
},
Location = "de/fra",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.ContainerRegistry;
import com.pulumi.ionoscloud.ContainerRegistryArgs;
import com.pulumi.ionoscloud.inputs.ContainerRegistryGarbageCollectionScheduleArgs;
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 ContainerRegistry("example", ContainerRegistryArgs.builder()
.apiSubnetAllowLists("1.2.3.4/32")
.garbageCollectionSchedule(ContainerRegistryGarbageCollectionScheduleArgs.builder()
.days(
"Monday",
"Tuesday")
.time("05:19:00+00:00")
.build())
.location("de/fra")
.build());
}
}
resources:
example:
type: ionoscloud:ContainerRegistry
properties:
apiSubnetAllowLists:
- 1.2.3.4/32
garbageCollectionSchedule:
days:
- Monday
- Tuesday
time: 05:19:00+00:00
location: de/fra
Create ContainerRegistry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContainerRegistry(name: string, args: ContainerRegistryArgs, opts?: CustomResourceOptions);
@overload
def ContainerRegistry(resource_name: str,
args: ContainerRegistryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContainerRegistry(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
api_subnet_allow_lists: Optional[Sequence[str]] = None,
container_registry_id: Optional[str] = None,
features: Optional[ContainerRegistryFeaturesArgs] = None,
garbage_collection_schedule: Optional[ContainerRegistryGarbageCollectionScheduleArgs] = None,
name: Optional[str] = None,
timeouts: Optional[ContainerRegistryTimeoutsArgs] = None)
func NewContainerRegistry(ctx *Context, name string, args ContainerRegistryArgs, opts ...ResourceOption) (*ContainerRegistry, error)
public ContainerRegistry(string name, ContainerRegistryArgs args, CustomResourceOptions? opts = null)
public ContainerRegistry(String name, ContainerRegistryArgs args)
public ContainerRegistry(String name, ContainerRegistryArgs args, CustomResourceOptions options)
type: ionoscloud:ContainerRegistry
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 ContainerRegistryArgs
- 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 ContainerRegistryArgs
- 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 ContainerRegistryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContainerRegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContainerRegistryArgs
- 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 containerRegistryResource = new Ionoscloud.ContainerRegistry("containerRegistryResource", new()
{
Location = "string",
ApiSubnetAllowLists = new[]
{
"string",
},
ContainerRegistryId = "string",
Features = new Ionoscloud.Inputs.ContainerRegistryFeaturesArgs
{
VulnerabilityScanning = false,
},
GarbageCollectionSchedule = new Ionoscloud.Inputs.ContainerRegistryGarbageCollectionScheduleArgs
{
Days = new[]
{
"string",
},
Time = "string",
},
Name = "string",
Timeouts = new Ionoscloud.Inputs.ContainerRegistryTimeoutsArgs
{
Create = "string",
Default = "string",
Delete = "string",
Update = "string",
},
});
example, err := ionoscloud.NewContainerRegistry(ctx, "containerRegistryResource", &ionoscloud.ContainerRegistryArgs{
Location: pulumi.String("string"),
ApiSubnetAllowLists: pulumi.StringArray{
pulumi.String("string"),
},
ContainerRegistryId: pulumi.String("string"),
Features: &ionoscloud.ContainerRegistryFeaturesArgs{
VulnerabilityScanning: pulumi.Bool(false),
},
GarbageCollectionSchedule: &ionoscloud.ContainerRegistryGarbageCollectionScheduleArgs{
Days: pulumi.StringArray{
pulumi.String("string"),
},
Time: pulumi.String("string"),
},
Name: pulumi.String("string"),
Timeouts: &ionoscloud.ContainerRegistryTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var containerRegistryResource = new ContainerRegistry("containerRegistryResource", ContainerRegistryArgs.builder()
.location("string")
.apiSubnetAllowLists("string")
.containerRegistryId("string")
.features(ContainerRegistryFeaturesArgs.builder()
.vulnerabilityScanning(false)
.build())
.garbageCollectionSchedule(ContainerRegistryGarbageCollectionScheduleArgs.builder()
.days("string")
.time("string")
.build())
.name("string")
.timeouts(ContainerRegistryTimeoutsArgs.builder()
.create("string")
.default_("string")
.delete("string")
.update("string")
.build())
.build());
container_registry_resource = ionoscloud.ContainerRegistry("containerRegistryResource",
location="string",
api_subnet_allow_lists=["string"],
container_registry_id="string",
features={
"vulnerability_scanning": False,
},
garbage_collection_schedule={
"days": ["string"],
"time": "string",
},
name="string",
timeouts={
"create": "string",
"default": "string",
"delete": "string",
"update": "string",
})
const containerRegistryResource = new ionoscloud.ContainerRegistry("containerRegistryResource", {
location: "string",
apiSubnetAllowLists: ["string"],
containerRegistryId: "string",
features: {
vulnerabilityScanning: false,
},
garbageCollectionSchedule: {
days: ["string"],
time: "string",
},
name: "string",
timeouts: {
create: "string",
"default": "string",
"delete": "string",
update: "string",
},
});
type: ionoscloud:ContainerRegistry
properties:
apiSubnetAllowLists:
- string
containerRegistryId: string
features:
vulnerabilityScanning: false
garbageCollectionSchedule:
days:
- string
time: string
location: string
name: string
timeouts:
create: string
default: string
delete: string
update: string
ContainerRegistry 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 ContainerRegistry resource accepts the following input properties:
- Location string
- [string] Immutable, update forces re-creation of the resource.
- Api
Subnet List<string>Allow Lists - [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.
- Container
Registry stringId - Features
Container
Registry Features - [Map]
- Garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [Map]
- Name string
- The name of the container registry. Immutable, update forces re-creation of the resource.
- Timeouts
Container
Registry Timeouts
- Location string
- [string] Immutable, update forces re-creation of the resource.
- Api
Subnet []stringAllow Lists - [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.
- Container
Registry stringId - Features
Container
Registry Features Args - [Map]
- Garbage
Collection ContainerSchedule Registry Garbage Collection Schedule Args - [Map]
- Name string
- The name of the container registry. Immutable, update forces re-creation of the resource.
- Timeouts
Container
Registry Timeouts Args
- location String
- [string] Immutable, update forces re-creation of the resource.
- api
Subnet List<String>Allow Lists - [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.
- container
Registry StringId - features
Container
Registry Features - [Map]
- garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [Map]
- name String
- The name of the container registry. Immutable, update forces re-creation of the resource.
- timeouts
Container
Registry Timeouts
- location string
- [string] Immutable, update forces re-creation of the resource.
- api
Subnet string[]Allow Lists - [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.
- container
Registry stringId - features
Container
Registry Features - [Map]
- garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [Map]
- name string
- The name of the container registry. Immutable, update forces re-creation of the resource.
- timeouts
Container
Registry Timeouts
- location str
- [string] Immutable, update forces re-creation of the resource.
- api_
subnet_ Sequence[str]allow_ lists - [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.
- container_
registry_ strid - features
Container
Registry Features Args - [Map]
- garbage_
collection_ Containerschedule Registry Garbage Collection Schedule Args - [Map]
- name str
- The name of the container registry. Immutable, update forces re-creation of the resource.
- timeouts
Container
Registry Timeouts Args
- location String
- [string] Immutable, update forces re-creation of the resource.
- api
Subnet List<String>Allow Lists - [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.
- container
Registry StringId - features Property Map
- [Map]
- garbage
Collection Property MapSchedule - [Map]
- name String
- The name of the container registry. Immutable, update forces re-creation of the resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ContainerRegistry resource produces the following output properties:
- Hostname string
- Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Usages List<ContainerRegistry Storage Usage>
- Hostname string
- Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Usages []ContainerRegistry Storage Usage
- hostname String
- id String
- The provider-assigned unique ID for this managed resource.
- storage
Usages List<ContainerRegistry Storage Usage>
- hostname string
- id string
- The provider-assigned unique ID for this managed resource.
- storage
Usages ContainerRegistry Storage Usage[]
- hostname str
- id str
- The provider-assigned unique ID for this managed resource.
- storage_
usages Sequence[ContainerRegistry Storage Usage]
- hostname String
- id String
- The provider-assigned unique ID for this managed resource.
- storage
Usages List<Property Map>
Look up Existing ContainerRegistry Resource
Get an existing ContainerRegistry 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?: ContainerRegistryState, opts?: CustomResourceOptions): ContainerRegistry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_subnet_allow_lists: Optional[Sequence[str]] = None,
container_registry_id: Optional[str] = None,
features: Optional[ContainerRegistryFeaturesArgs] = None,
garbage_collection_schedule: Optional[ContainerRegistryGarbageCollectionScheduleArgs] = None,
hostname: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
storage_usages: Optional[Sequence[ContainerRegistryStorageUsageArgs]] = None,
timeouts: Optional[ContainerRegistryTimeoutsArgs] = None) -> ContainerRegistry
func GetContainerRegistry(ctx *Context, name string, id IDInput, state *ContainerRegistryState, opts ...ResourceOption) (*ContainerRegistry, error)
public static ContainerRegistry Get(string name, Input<string> id, ContainerRegistryState? state, CustomResourceOptions? opts = null)
public static ContainerRegistry get(String name, Output<String> id, ContainerRegistryState state, CustomResourceOptions options)
resources: _: type: ionoscloud:ContainerRegistry 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.
- Api
Subnet List<string>Allow Lists - [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.
- Container
Registry stringId - Features
Container
Registry Features - [Map]
- Garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [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.
- Storage
Usages List<ContainerRegistry Storage Usage> - Timeouts
Container
Registry Timeouts
- Api
Subnet []stringAllow Lists - [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.
- Container
Registry stringId - Features
Container
Registry Features Args - [Map]
- Garbage
Collection ContainerSchedule Registry Garbage Collection Schedule Args - [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.
- Storage
Usages []ContainerRegistry Storage Usage Args - Timeouts
Container
Registry Timeouts Args
- api
Subnet List<String>Allow Lists - [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.
- container
Registry StringId - features
Container
Registry Features - [Map]
- garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [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.
- storage
Usages List<ContainerRegistry Storage Usage> - timeouts
Container
Registry Timeouts
- api
Subnet string[]Allow Lists - [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.
- container
Registry stringId - features
Container
Registry Features - [Map]
- garbage
Collection ContainerSchedule Registry Garbage Collection Schedule - [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.
- storage
Usages ContainerRegistry Storage Usage[] - timeouts
Container
Registry Timeouts
- api_
subnet_ Sequence[str]allow_ lists - [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.
- container_
registry_ strid - features
Container
Registry Features Args - [Map]
- garbage_
collection_ Containerschedule Registry Garbage Collection Schedule Args - [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[ContainerRegistry Storage Usage Args] - timeouts
Container
Registry Timeouts Args
- api
Subnet List<String>Allow Lists - [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.
- container
Registry StringId - features Property Map
- [Map]
- garbage
Collection Property MapSchedule - [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.
- storage
Usages List<Property Map> - timeouts Property Map
Supporting Types
ContainerRegistryFeatures, ContainerRegistryFeaturesArgs
- 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, ensurevulnerability_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, ensurevulnerability_scanning
is set to false on resource creation.
- vulnerability
Scanning 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, ensurevulnerability_scanning
is set to false on resource creation.
- vulnerability
Scanning 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, ensurevulnerability_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, ensurevulnerability_scanning
is set to false on resource creation.
- vulnerability
Scanning 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, ensurevulnerability_scanning
is set to false on resource creation.
ContainerRegistryGarbageCollectionSchedule, ContainerRegistryGarbageCollectionScheduleArgs
ContainerRegistryStorageUsage, ContainerRegistryStorageUsageArgs
- bytes float
- updated_
at str
ContainerRegistryTimeouts, ContainerRegistryTimeoutsArgs
Import
Resource Container Registry can be imported using the resource id
, e.g.
$ pulumi import ionoscloud:index/containerRegistry:ContainerRegistry mycr container_registry uuid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.