1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. ContainerRegistry
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

ovh.CloudProject.ContainerRegistry

Explore with Pulumi AI

ovh logo
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

    Creates a container registry associated with a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    import * as ovh from "@pulumi/ovh";
    
    const regcap = ovh.CloudProject.getCapabilitiesContainerFilter({
        serviceName: "XXXXXX",
        planName: "SMALL",
        region: "GRA",
    });
    const my_registry = new ovh.cloudproject.ContainerRegistry("my-registry", {
        serviceName: regcap.then(regcap => regcap.serviceName),
        planId: regcap.then(regcap => regcap.id),
        region: regcap.then(regcap => regcap.region),
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    regcap = ovh.CloudProject.get_capabilities_container_filter(service_name="XXXXXX",
        plan_name="SMALL",
        region="GRA")
    my_registry = ovh.cloud_project.ContainerRegistry("my-registry",
        service_name=regcap.service_name,
        plan_id=regcap.id,
        region=regcap.region)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		regcap, err := CloudProject.GetCapabilitiesContainerFilter(ctx, &cloudproject.GetCapabilitiesContainerFilterArgs{
    			ServiceName: "XXXXXX",
    			PlanName:    "SMALL",
    			Region:      "GRA",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = CloudProject.NewContainerRegistry(ctx, "my-registry", &CloudProject.ContainerRegistryArgs{
    			ServiceName: pulumi.String(regcap.ServiceName),
    			PlanId:      pulumi.String(regcap.Id),
    			Region:      pulumi.String(regcap.Region),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var regcap = Ovh.CloudProject.GetCapabilitiesContainerFilter.Invoke(new()
        {
            ServiceName = "XXXXXX",
            PlanName = "SMALL",
            Region = "GRA",
        });
    
        var my_registry = new Ovh.CloudProject.ContainerRegistry("my-registry", new()
        {
            ServiceName = regcap.Apply(getCapabilitiesContainerFilterResult => getCapabilitiesContainerFilterResult.ServiceName),
            PlanId = regcap.Apply(getCapabilitiesContainerFilterResult => getCapabilitiesContainerFilterResult.Id),
            Region = regcap.Apply(getCapabilitiesContainerFilterResult => getCapabilitiesContainerFilterResult.Region),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
    import com.pulumi.ovh.CloudProject.inputs.GetCapabilitiesContainerFilterArgs;
    import com.pulumi.ovh.CloudProject.ContainerRegistry;
    import com.pulumi.ovh.CloudProject.ContainerRegistryArgs;
    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 regcap = CloudProjectFunctions.getCapabilitiesContainerFilter(GetCapabilitiesContainerFilterArgs.builder()
                .serviceName("XXXXXX")
                .planName("SMALL")
                .region("GRA")
                .build());
    
            var my_registry = new ContainerRegistry("my-registry", ContainerRegistryArgs.builder()
                .serviceName(regcap.applyValue(getCapabilitiesContainerFilterResult -> getCapabilitiesContainerFilterResult.serviceName()))
                .planId(regcap.applyValue(getCapabilitiesContainerFilterResult -> getCapabilitiesContainerFilterResult.id()))
                .region(regcap.applyValue(getCapabilitiesContainerFilterResult -> getCapabilitiesContainerFilterResult.region()))
                .build());
    
        }
    }
    
    resources:
      my-registry:
        type: ovh:CloudProject:ContainerRegistry
        properties:
          serviceName: ${regcap.serviceName}
          planId: ${regcap.id}
          region: ${regcap.region}
    variables:
      regcap:
        fn::invoke:
          Function: ovh:CloudProject:getCapabilitiesContainerFilter
          Arguments:
            serviceName: XXXXXX
            planName: SMALL
            region: GRA
    

    WARNING You can update and migrate to a higher plan at any time but not the contrary.

    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,
                          region: Optional[str] = None,
                          service_name: Optional[str] = None,
                          name: Optional[str] = None,
                          plan_id: Optional[str] = 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: ovh:CloudProject: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.

    Example

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

    var containerRegistryResource = new Ovh.CloudProject.ContainerRegistry("containerRegistryResource", new()
    {
        Region = "string",
        ServiceName = "string",
        Name = "string",
        PlanId = "string",
    });
    
    example, err := CloudProject.NewContainerRegistry(ctx, "containerRegistryResource", &CloudProject.ContainerRegistryArgs{
    	Region:      pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	PlanId:      pulumi.String("string"),
    })
    
    var containerRegistryResource = new ContainerRegistry("containerRegistryResource", ContainerRegistryArgs.builder()
        .region("string")
        .serviceName("string")
        .name("string")
        .planId("string")
        .build());
    
    container_registry_resource = ovh.cloud_project.ContainerRegistry("containerRegistryResource",
        region="string",
        service_name="string",
        name="string",
        plan_id="string")
    
    const containerRegistryResource = new ovh.cloudproject.ContainerRegistry("containerRegistryResource", {
        region: "string",
        serviceName: "string",
        name: "string",
        planId: "string",
    });
    
    type: ovh:CloudProject:ContainerRegistry
    properties:
        name: string
        planId: string
        region: string
        serviceName: 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

    The ContainerRegistry resource accepts the following input properties:

    Region string
    Region of the registry
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    Registry name
    PlanId string
    Plan ID of the registry
    Region string
    Region of the registry
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    Registry name
    PlanId string
    Plan ID of the registry
    region String
    Region of the registry
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    Registry name
    planId String
    Plan ID of the registry
    region string
    Region of the registry
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name string
    Registry name
    planId string
    Plan ID of the registry
    region str
    Region of the registry
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name str
    Registry name
    plan_id str
    Plan ID of the registry
    region String
    Region of the registry
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    Registry name
    planId String
    Plan ID of the registry

    Outputs

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

    CreatedAt string
    Plan creation date
    Id string
    The provider-assigned unique ID for this managed resource.
    Plans List<ContainerRegistryPlan>
    Plan of the registry
    ProjectId string
    Project ID of your registry
    Size int
    Current size of the registry (bytes)
    Status string
    Registry status
    UpdatedAt string
    Registry last update date
    Url string
    Access url of the registry
    Version string
    Version of your registry
    CreatedAt string
    Plan creation date
    Id string
    The provider-assigned unique ID for this managed resource.
    Plans []ContainerRegistryPlan
    Plan of the registry
    ProjectId string
    Project ID of your registry
    Size int
    Current size of the registry (bytes)
    Status string
    Registry status
    UpdatedAt string
    Registry last update date
    Url string
    Access url of the registry
    Version string
    Version of your registry
    createdAt String
    Plan creation date
    id String
    The provider-assigned unique ID for this managed resource.
    plans List<ContainerRegistryPlan>
    Plan of the registry
    projectId String
    Project ID of your registry
    size Integer
    Current size of the registry (bytes)
    status String
    Registry status
    updatedAt String
    Registry last update date
    url String
    Access url of the registry
    version String
    Version of your registry
    createdAt string
    Plan creation date
    id string
    The provider-assigned unique ID for this managed resource.
    plans ContainerRegistryPlan[]
    Plan of the registry
    projectId string
    Project ID of your registry
    size number
    Current size of the registry (bytes)
    status string
    Registry status
    updatedAt string
    Registry last update date
    url string
    Access url of the registry
    version string
    Version of your registry
    created_at str
    Plan creation date
    id str
    The provider-assigned unique ID for this managed resource.
    plans Sequence[cloudproject.ContainerRegistryPlan]
    Plan of the registry
    project_id str
    Project ID of your registry
    size int
    Current size of the registry (bytes)
    status str
    Registry status
    updated_at str
    Registry last update date
    url str
    Access url of the registry
    version str
    Version of your registry
    createdAt String
    Plan creation date
    id String
    The provider-assigned unique ID for this managed resource.
    plans List<Property Map>
    Plan of the registry
    projectId String
    Project ID of your registry
    size Number
    Current size of the registry (bytes)
    status String
    Registry status
    updatedAt String
    Registry last update date
    url String
    Access url of the registry
    version String
    Version of your registry

    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,
            created_at: Optional[str] = None,
            name: Optional[str] = None,
            plan_id: Optional[str] = None,
            plans: Optional[Sequence[_cloudproject.ContainerRegistryPlanArgs]] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            service_name: Optional[str] = None,
            size: Optional[int] = None,
            status: Optional[str] = None,
            updated_at: Optional[str] = None,
            url: Optional[str] = None,
            version: Optional[str] = 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)
    Resource lookup is not supported in YAML
    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:
    CreatedAt string
    Plan creation date
    Name string
    Registry name
    PlanId string
    Plan ID of the registry
    Plans List<ContainerRegistryPlan>
    Plan of the registry
    ProjectId string
    Project ID of your registry
    Region string
    Region of the registry
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Size int
    Current size of the registry (bytes)
    Status string
    Registry status
    UpdatedAt string
    Registry last update date
    Url string
    Access url of the registry
    Version string
    Version of your registry
    CreatedAt string
    Plan creation date
    Name string
    Registry name
    PlanId string
    Plan ID of the registry
    Plans []ContainerRegistryPlanArgs
    Plan of the registry
    ProjectId string
    Project ID of your registry
    Region string
    Region of the registry
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Size int
    Current size of the registry (bytes)
    Status string
    Registry status
    UpdatedAt string
    Registry last update date
    Url string
    Access url of the registry
    Version string
    Version of your registry
    createdAt String
    Plan creation date
    name String
    Registry name
    planId String
    Plan ID of the registry
    plans List<ContainerRegistryPlan>
    Plan of the registry
    projectId String
    Project ID of your registry
    region String
    Region of the registry
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    size Integer
    Current size of the registry (bytes)
    status String
    Registry status
    updatedAt String
    Registry last update date
    url String
    Access url of the registry
    version String
    Version of your registry
    createdAt string
    Plan creation date
    name string
    Registry name
    planId string
    Plan ID of the registry
    plans ContainerRegistryPlan[]
    Plan of the registry
    projectId string
    Project ID of your registry
    region string
    Region of the registry
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    size number
    Current size of the registry (bytes)
    status string
    Registry status
    updatedAt string
    Registry last update date
    url string
    Access url of the registry
    version string
    Version of your registry
    created_at str
    Plan creation date
    name str
    Registry name
    plan_id str
    Plan ID of the registry
    plans Sequence[cloudproject.ContainerRegistryPlanArgs]
    Plan of the registry
    project_id str
    Project ID of your registry
    region str
    Region of the registry
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    size int
    Current size of the registry (bytes)
    status str
    Registry status
    updated_at str
    Registry last update date
    url str
    Access url of the registry
    version str
    Version of your registry
    createdAt String
    Plan creation date
    name String
    Registry name
    planId String
    Plan ID of the registry
    plans List<Property Map>
    Plan of the registry
    projectId String
    Project ID of your registry
    region String
    Region of the registry
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    size Number
    Current size of the registry (bytes)
    status String
    Registry status
    updatedAt String
    Registry last update date
    url String
    Access url of the registry
    version String
    Version of your registry

    Supporting Types

    ContainerRegistryPlan, ContainerRegistryPlanArgs

    Code string
    Plan code from the catalog
    CreatedAt string
    Plan creation date
    Features List<ContainerRegistryPlanFeature>
    Features of the plan
    Id string
    Plan ID
    Name string
    Registry name
    RegistryLimits List<ContainerRegistryPlanRegistryLimit>
    Container registry limits
    UpdatedAt string
    Registry last update date
    Code string
    Plan code from the catalog
    CreatedAt string
    Plan creation date
    Features []ContainerRegistryPlanFeature
    Features of the plan
    Id string
    Plan ID
    Name string
    Registry name
    RegistryLimits []ContainerRegistryPlanRegistryLimit
    Container registry limits
    UpdatedAt string
    Registry last update date
    code String
    Plan code from the catalog
    createdAt String
    Plan creation date
    features List<ContainerRegistryPlanFeature>
    Features of the plan
    id String
    Plan ID
    name String
    Registry name
    registryLimits List<ContainerRegistryPlanRegistryLimit>
    Container registry limits
    updatedAt String
    Registry last update date
    code string
    Plan code from the catalog
    createdAt string
    Plan creation date
    features ContainerRegistryPlanFeature[]
    Features of the plan
    id string
    Plan ID
    name string
    Registry name
    registryLimits ContainerRegistryPlanRegistryLimit[]
    Container registry limits
    updatedAt string
    Registry last update date
    code str
    Plan code from the catalog
    created_at str
    Plan creation date
    features Sequence[cloudproject.ContainerRegistryPlanFeature]
    Features of the plan
    id str
    Plan ID
    name str
    Registry name
    registry_limits Sequence[cloudproject.ContainerRegistryPlanRegistryLimit]
    Container registry limits
    updated_at str
    Registry last update date
    code String
    Plan code from the catalog
    createdAt String
    Plan creation date
    features List<Property Map>
    Features of the plan
    id String
    Plan ID
    name String
    Registry name
    registryLimits List<Property Map>
    Container registry limits
    updatedAt String
    Registry last update date

    ContainerRegistryPlanFeature, ContainerRegistryPlanFeatureArgs

    Vulnerability bool
    Vulnerability scanning
    Vulnerability bool
    Vulnerability scanning
    vulnerability Boolean
    Vulnerability scanning
    vulnerability boolean
    Vulnerability scanning
    vulnerability bool
    Vulnerability scanning
    vulnerability Boolean
    Vulnerability scanning

    ContainerRegistryPlanRegistryLimit, ContainerRegistryPlanRegistryLimitArgs

    ImageStorage int
    Docker image storage limits in bytes
    ParallelRequest int
    Parallel requests on Docker image API (/v2 Docker registry API)
    ImageStorage int
    Docker image storage limits in bytes
    ParallelRequest int
    Parallel requests on Docker image API (/v2 Docker registry API)
    imageStorage Integer
    Docker image storage limits in bytes
    parallelRequest Integer
    Parallel requests on Docker image API (/v2 Docker registry API)
    imageStorage number
    Docker image storage limits in bytes
    parallelRequest number
    Parallel requests on Docker image API (/v2 Docker registry API)
    image_storage int
    Docker image storage limits in bytes
    parallel_request int
    Parallel requests on Docker image API (/v2 Docker registry API)
    imageStorage Number
    Docker image storage limits in bytes
    parallelRequest Number
    Parallel requests on Docker image API (/v2 Docker registry API)

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud