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

ovh.CloudProject.ContainerRegistryUser

Explore with Pulumi AI

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

    Creates a user for 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 registry = ovh.CloudProject.getContainerRegistry({
        serviceName: "XXXXXX",
        registryId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    });
    const user = new ovh.cloudproject.ContainerRegistryUser("user", {
        serviceName: ovh_cloud_project_containerregistry.registry.service_name,
        registryId: ovh_cloud_project_containerregistry.registry.id,
        email: "foo@bar.com",
        login: "foobar",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    registry = ovh.CloudProject.get_container_registry(service_name="XXXXXX",
        registry_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
    user = ovh.cloud_project.ContainerRegistryUser("user",
        service_name=ovh_cloud_project_containerregistry["registry"]["service_name"],
        registry_id=ovh_cloud_project_containerregistry["registry"]["id"],
        email="foo@bar.com",
        login="foobar")
    
    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 {
    		_, err := CloudProject.GetContainerRegistry(ctx, &cloudproject.GetContainerRegistryArgs{
    			ServiceName: "XXXXXX",
    			RegistryId:  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = CloudProject.NewContainerRegistryUser(ctx, "user", &CloudProject.ContainerRegistryUserArgs{
    			ServiceName: pulumi.Any(ovh_cloud_project_containerregistry.Registry.Service_name),
    			RegistryId:  pulumi.Any(ovh_cloud_project_containerregistry.Registry.Id),
    			Email:       pulumi.String("foo@bar.com"),
    			Login:       pulumi.String("foobar"),
    		})
    		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 registry = Ovh.CloudProject.GetContainerRegistry.Invoke(new()
        {
            ServiceName = "XXXXXX",
            RegistryId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
        });
    
        var user = new Ovh.CloudProject.ContainerRegistryUser("user", new()
        {
            ServiceName = ovh_cloud_project_containerregistry.Registry.Service_name,
            RegistryId = ovh_cloud_project_containerregistry.Registry.Id,
            Email = "foo@bar.com",
            Login = "foobar",
        });
    
    });
    
    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.GetContainerRegistryArgs;
    import com.pulumi.ovh.CloudProject.ContainerRegistryUser;
    import com.pulumi.ovh.CloudProject.ContainerRegistryUserArgs;
    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 registry = CloudProjectFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
                .serviceName("XXXXXX")
                .registryId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
                .build());
    
            var user = new ContainerRegistryUser("user", ContainerRegistryUserArgs.builder()
                .serviceName(ovh_cloud_project_containerregistry.registry().service_name())
                .registryId(ovh_cloud_project_containerregistry.registry().id())
                .email("foo@bar.com")
                .login("foobar")
                .build());
    
        }
    }
    
    resources:
      user:
        type: ovh:CloudProject:ContainerRegistryUser
        properties:
          serviceName: ${ovh_cloud_project_containerregistry.registry.service_name}
          registryId: ${ovh_cloud_project_containerregistry.registry.id}
          email: foo@bar.com
          login: foobar
    variables:
      registry:
        fn::invoke:
          Function: ovh:CloudProject:getContainerRegistry
          Arguments:
            serviceName: XXXXXX
            registryId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
    

    Create ContainerRegistryUser Resource

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

    Constructor syntax

    new ContainerRegistryUser(name: string, args: ContainerRegistryUserArgs, opts?: CustomResourceOptions);
    @overload
    def ContainerRegistryUser(resource_name: str,
                              args: ContainerRegistryUserArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContainerRegistryUser(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              email: Optional[str] = None,
                              login: Optional[str] = None,
                              registry_id: Optional[str] = None,
                              service_name: Optional[str] = None)
    func NewContainerRegistryUser(ctx *Context, name string, args ContainerRegistryUserArgs, opts ...ResourceOption) (*ContainerRegistryUser, error)
    public ContainerRegistryUser(string name, ContainerRegistryUserArgs args, CustomResourceOptions? opts = null)
    public ContainerRegistryUser(String name, ContainerRegistryUserArgs args)
    public ContainerRegistryUser(String name, ContainerRegistryUserArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProject:ContainerRegistryUser
    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 ContainerRegistryUserArgs
    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 ContainerRegistryUserArgs
    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 ContainerRegistryUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerRegistryUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContainerRegistryUserArgs
    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 containerRegistryUserResource = new Ovh.CloudProject.ContainerRegistryUser("containerRegistryUserResource", new()
    {
        Email = "string",
        Login = "string",
        RegistryId = "string",
        ServiceName = "string",
    });
    
    example, err := CloudProject.NewContainerRegistryUser(ctx, "containerRegistryUserResource", &CloudProject.ContainerRegistryUserArgs{
    	Email:       pulumi.String("string"),
    	Login:       pulumi.String("string"),
    	RegistryId:  pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    })
    
    var containerRegistryUserResource = new ContainerRegistryUser("containerRegistryUserResource", ContainerRegistryUserArgs.builder()
        .email("string")
        .login("string")
        .registryId("string")
        .serviceName("string")
        .build());
    
    container_registry_user_resource = ovh.cloud_project.ContainerRegistryUser("containerRegistryUserResource",
        email="string",
        login="string",
        registry_id="string",
        service_name="string")
    
    const containerRegistryUserResource = new ovh.cloudproject.ContainerRegistryUser("containerRegistryUserResource", {
        email: "string",
        login: "string",
        registryId: "string",
        serviceName: "string",
    });
    
    type: ovh:CloudProject:ContainerRegistryUser
    properties:
        email: string
        login: string
        registryId: string
        serviceName: string
    

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

    Email string
    User email
    Login string
    Registry name
    RegistryId string
    Registry ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Email string
    User email
    Login string
    Registry name
    RegistryId string
    Registry ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    email String
    User email
    login String
    Registry name
    registryId String
    Registry ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    email string
    User email
    login string
    Registry name
    registryId string
    Registry ID
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    email str
    User email
    login str
    Registry name
    registry_id str
    Registry ID
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    email String
    User email
    login String
    Registry name
    registryId String
    Registry ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    (Sensitive) User password
    User string
    User name
    Id string
    The provider-assigned unique ID for this managed resource.
    Password string
    (Sensitive) User password
    User string
    User name
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    (Sensitive) User password
    user String
    User name
    id string
    The provider-assigned unique ID for this managed resource.
    password string
    (Sensitive) User password
    user string
    User name
    id str
    The provider-assigned unique ID for this managed resource.
    password str
    (Sensitive) User password
    user str
    User name
    id String
    The provider-assigned unique ID for this managed resource.
    password String
    (Sensitive) User password
    user String
    User name

    Look up Existing ContainerRegistryUser Resource

    Get an existing ContainerRegistryUser 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?: ContainerRegistryUserState, opts?: CustomResourceOptions): ContainerRegistryUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            login: Optional[str] = None,
            password: Optional[str] = None,
            registry_id: Optional[str] = None,
            service_name: Optional[str] = None,
            user: Optional[str] = None) -> ContainerRegistryUser
    func GetContainerRegistryUser(ctx *Context, name string, id IDInput, state *ContainerRegistryUserState, opts ...ResourceOption) (*ContainerRegistryUser, error)
    public static ContainerRegistryUser Get(string name, Input<string> id, ContainerRegistryUserState? state, CustomResourceOptions? opts = null)
    public static ContainerRegistryUser get(String name, Output<String> id, ContainerRegistryUserState 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:
    Email string
    User email
    Login string
    Registry name
    Password string
    (Sensitive) User password
    RegistryId string
    Registry ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    User string
    User name
    Email string
    User email
    Login string
    Registry name
    Password string
    (Sensitive) User password
    RegistryId string
    Registry ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    User string
    User name
    email String
    User email
    login String
    Registry name
    password String
    (Sensitive) User password
    registryId String
    Registry ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    user String
    User name
    email string
    User email
    login string
    Registry name
    password string
    (Sensitive) User password
    registryId string
    Registry ID
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    user string
    User name
    email str
    User email
    login str
    Registry name
    password str
    (Sensitive) User password
    registry_id str
    Registry ID
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    user str
    User name
    email String
    User email
    login String
    Registry name
    password String
    (Sensitive) User password
    registryId String
    Registry ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    user String
    User name

    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