1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectContainerregistryIam
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

ovh.CloudProjectContainerregistryIam

Explore with Pulumi AI

ovh logo
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

    Creates an IAM configuration in an OVHcloud Managed Private Registry.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const registryIam = new ovh.CloudProjectContainerregistryIam("registry_iam", {
        serviceName: "XXXXXX",
        registryId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
        deleteUsers: false,
    });
    export const iamEnabled = registryIam.iamEnabled;
    
    import pulumi
    import pulumi_ovh as ovh
    
    registry_iam = ovh.CloudProjectContainerregistryIam("registry_iam",
        service_name="XXXXXX",
        registry_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
        delete_users=False)
    pulumi.export("iamEnabled", registry_iam.iam_enabled)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		registryIam, err := ovh.NewCloudProjectContainerregistryIam(ctx, "registry_iam", &ovh.CloudProjectContainerregistryIamArgs{
    			ServiceName: pulumi.String("XXXXXX"),
    			RegistryId:  pulumi.String("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"),
    			DeleteUsers: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("iamEnabled", registryIam.IamEnabled)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var registryIam = new Ovh.CloudProjectContainerregistryIam("registry_iam", new()
        {
            ServiceName = "XXXXXX",
            RegistryId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
            DeleteUsers = false,
        });
    
        return new Dictionary<string, object?>
        {
            ["iamEnabled"] = registryIam.IamEnabled,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudProjectContainerregistryIam;
    import com.ovhcloud.pulumi.ovh.CloudProjectContainerregistryIamArgs;
    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 registryIam = new CloudProjectContainerregistryIam("registryIam", CloudProjectContainerregistryIamArgs.builder()
                .serviceName("XXXXXX")
                .registryId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
                .deleteUsers(false)
                .build());
    
            ctx.export("iamEnabled", registryIam.iamEnabled());
        }
    }
    
    resources:
      registryIam:
        type: ovh:CloudProjectContainerregistryIam
        name: registry_iam
        properties:
          serviceName: XXXXXX
          registryId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
          deleteUsers: false
    outputs:
      iamEnabled: ${registryIam.iamEnabled}
    

    Create CloudProjectContainerregistryIam Resource

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

    Constructor syntax

    new CloudProjectContainerregistryIam(name: string, args: CloudProjectContainerregistryIamArgs, opts?: CustomResourceOptions);
    @overload
    def CloudProjectContainerregistryIam(resource_name: str,
                                         args: CloudProjectContainerregistryIamArgs,
                                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudProjectContainerregistryIam(resource_name: str,
                                         opts: Optional[ResourceOptions] = None,
                                         registry_id: Optional[str] = None,
                                         delete_users: Optional[bool] = None,
                                         service_name: Optional[str] = None)
    func NewCloudProjectContainerregistryIam(ctx *Context, name string, args CloudProjectContainerregistryIamArgs, opts ...ResourceOption) (*CloudProjectContainerregistryIam, error)
    public CloudProjectContainerregistryIam(string name, CloudProjectContainerregistryIamArgs args, CustomResourceOptions? opts = null)
    public CloudProjectContainerregistryIam(String name, CloudProjectContainerregistryIamArgs args)
    public CloudProjectContainerregistryIam(String name, CloudProjectContainerregistryIamArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProjectContainerregistryIam
    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 CloudProjectContainerregistryIamArgs
    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 CloudProjectContainerregistryIamArgs
    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 CloudProjectContainerregistryIamArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudProjectContainerregistryIamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudProjectContainerregistryIamArgs
    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 cloudProjectContainerregistryIamResource = new Ovh.CloudProjectContainerregistryIam("cloudProjectContainerregistryIamResource", new()
    {
        RegistryId = "string",
        DeleteUsers = false,
        ServiceName = "string",
    });
    
    example, err := ovh.NewCloudProjectContainerregistryIam(ctx, "cloudProjectContainerregistryIamResource", &ovh.CloudProjectContainerregistryIamArgs{
    	RegistryId:  pulumi.String("string"),
    	DeleteUsers: pulumi.Bool(false),
    	ServiceName: pulumi.String("string"),
    })
    
    var cloudProjectContainerregistryIamResource = new CloudProjectContainerregistryIam("cloudProjectContainerregistryIamResource", CloudProjectContainerregistryIamArgs.builder()
        .registryId("string")
        .deleteUsers(false)
        .serviceName("string")
        .build());
    
    cloud_project_containerregistry_iam_resource = ovh.CloudProjectContainerregistryIam("cloudProjectContainerregistryIamResource",
        registry_id="string",
        delete_users=False,
        service_name="string")
    
    const cloudProjectContainerregistryIamResource = new ovh.CloudProjectContainerregistryIam("cloudProjectContainerregistryIamResource", {
        registryId: "string",
        deleteUsers: false,
        serviceName: "string",
    });
    
    type: ovh:CloudProjectContainerregistryIam
    properties:
        deleteUsers: false
        registryId: string
        serviceName: string
    

    CloudProjectContainerregistryIam 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 CloudProjectContainerregistryIam resource accepts the following input properties:

    RegistryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    DeleteUsers bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    RegistryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    DeleteUsers bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    registryId String
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    deleteUsers Boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    registryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    deleteUsers boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    serviceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    registry_id str
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    delete_users bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    service_name str
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    registryId String
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    deleteUsers Boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.

    Outputs

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

    IamEnabled bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IamEnabled bool
    Id string
    The provider-assigned unique ID for this managed resource.
    iamEnabled Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    iamEnabled boolean
    id string
    The provider-assigned unique ID for this managed resource.
    iam_enabled bool
    id str
    The provider-assigned unique ID for this managed resource.
    iamEnabled Boolean
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CloudProjectContainerregistryIam Resource

    Get an existing CloudProjectContainerregistryIam 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?: CloudProjectContainerregistryIamState, opts?: CustomResourceOptions): CloudProjectContainerregistryIam
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            delete_users: Optional[bool] = None,
            iam_enabled: Optional[bool] = None,
            registry_id: Optional[str] = None,
            service_name: Optional[str] = None) -> CloudProjectContainerregistryIam
    func GetCloudProjectContainerregistryIam(ctx *Context, name string, id IDInput, state *CloudProjectContainerregistryIamState, opts ...ResourceOption) (*CloudProjectContainerregistryIam, error)
    public static CloudProjectContainerregistryIam Get(string name, Input<string> id, CloudProjectContainerregistryIamState? state, CustomResourceOptions? opts = null)
    public static CloudProjectContainerregistryIam get(String name, Output<String> id, CloudProjectContainerregistryIamState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudProjectContainerregistryIam    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:
    DeleteUsers bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    IamEnabled bool
    RegistryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    DeleteUsers bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    IamEnabled bool
    RegistryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    deleteUsers Boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    iamEnabled Boolean
    registryId String
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    deleteUsers boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    iamEnabled boolean
    registryId string
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    serviceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    delete_users bool
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    iam_enabled bool
    registry_id str
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    service_name str
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.
    deleteUsers Boolean
    Delete existing users from Harbor. IAM can't be enabled if there is at least one user already created. This parameter is only used at IAM configuration creation. Changing this value recreates the resource.
    iamEnabled Boolean
    registryId String
    The ID of the Managed Private Registry. Changing this value recreates the resource.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used. Changing this value recreates the resource.

    Import

    OVHcloud Managed Private Registry IAM can be imported using the tenant service_name and registry id registry_id separated by “/” E.g.,

    bash

    $ pulumi import ovh:index/cloudProjectContainerregistryIam:CloudProjectContainerregistryIam my-iam service_name/registry_id
    

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

    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 v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud