Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

CloudProjectContainerRegistryUser

Creates a user for a container registry associated with a public cloud project.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var registry = Ovh.GetCloudProjectContainerRegistry.Invoke(new()
    {
        ServiceName = "XXXXXX",
        RegistryId = "yyyy",
    });

    var user = new Ovh.CloudProjectContainerRegistryUser("user", new()
    {
        ServiceName = ovh_cloud_project_containerregistry.Registry.Service_name,
        RegistryId = ovh_cloud_project_containerregistry.Registry.Id,
        Email = "foo@bar.com",
        Login = "foobar",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ovh.LookupCloudProjectContainerRegistry(ctx, &GetCloudProjectContainerRegistryArgs{
			ServiceName: "XXXXXX",
			RegistryId:  "yyyy",
		}, nil)
		if err != nil {
			return err
		}
		_, err = ovh.NewCloudProjectContainerRegistryUser(ctx, "user", &ovh.CloudProjectContainerRegistryUserArgs{
			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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetCloudProjectContainerRegistryArgs;
import com.pulumi.ovh.CloudProjectContainerRegistryUser;
import com.pulumi.ovh.CloudProjectContainerRegistryUserArgs;
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 = OvhFunctions.getCloudProjectContainerRegistry(GetCloudProjectContainerRegistryArgs.builder()
            .serviceName("XXXXXX")
            .registryId("yyyy")
            .build());

        var user = new CloudProjectContainerRegistryUser("user", CloudProjectContainerRegistryUserArgs.builder()        
            .serviceName(ovh_cloud_project_containerregistry.registry().service_name())
            .registryId(ovh_cloud_project_containerregistry.registry().id())
            .email("foo@bar.com")
            .login("foobar")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_ovh as ovh
import pulumi_ovh as ovh

registry = ovh.get_cloud_project_container_registry(service_name="XXXXXX",
    registry_id="yyyy")
user = ovh.CloudProjectContainerRegistryUser("user",
    service_name=ovh_cloud_project_containerregistry["registry"]["service_name"],
    registry_id=ovh_cloud_project_containerregistry["registry"]["id"],
    email="foo@bar.com",
    login="foobar")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@lbrlabs/pulumi-ovh";
import * as ovh from "@pulumi/ovh";

const registry = ovh.getCloudProjectContainerRegistry({
    serviceName: "XXXXXX",
    registryId: "yyyy",
});
const user = new ovh.CloudProjectContainerRegistryUser("user", {
    serviceName: ovh_cloud_project_containerregistry.registry.service_name,
    registryId: ovh_cloud_project_containerregistry.registry.id,
    email: "foo@bar.com",
    login: "foobar",
});
resources:
  user:
    type: ovh:CloudProjectContainerRegistryUser
    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:getCloudProjectContainerRegistry
      Arguments:
        serviceName: XXXXXX
        registryId: yyyy

Create a CloudProjectContainerRegistryUser Resource

new CloudProjectContainerRegistryUser(name: string, args: CloudProjectContainerRegistryUserArgs, opts?: CustomResourceOptions);
@overload
def CloudProjectContainerRegistryUser(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)
@overload
def CloudProjectContainerRegistryUser(resource_name: str,
                                      args: CloudProjectContainerRegistryUserArgs,
                                      opts: Optional[ResourceOptions] = None)
func NewCloudProjectContainerRegistryUser(ctx *Context, name string, args CloudProjectContainerRegistryUserArgs, opts ...ResourceOption) (*CloudProjectContainerRegistryUser, error)
public CloudProjectContainerRegistryUser(string name, CloudProjectContainerRegistryUserArgs args, CustomResourceOptions? opts = null)
public CloudProjectContainerRegistryUser(String name, CloudProjectContainerRegistryUserArgs args)
public CloudProjectContainerRegistryUser(String name, CloudProjectContainerRegistryUserArgs args, CustomResourceOptions options)
type: ovh:CloudProjectContainerRegistryUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CloudProjectContainerRegistryUserArgs
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 CloudProjectContainerRegistryUserArgs
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 CloudProjectContainerRegistryUserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CloudProjectContainerRegistryUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CloudProjectContainerRegistryUserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CloudProjectContainerRegistryUser 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 CloudProjectContainerRegistryUser 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 CloudProjectContainerRegistryUser 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 an Existing CloudProjectContainerRegistryUser Resource

Get an existing CloudProjectContainerRegistryUser 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?: CloudProjectContainerRegistryUserState, opts?: CustomResourceOptions): CloudProjectContainerRegistryUser
@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) -> CloudProjectContainerRegistryUser
func GetCloudProjectContainerRegistryUser(ctx *Context, name string, id IDInput, state *CloudProjectContainerRegistryUserState, opts ...ResourceOption) (*CloudProjectContainerRegistryUser, error)
public static CloudProjectContainerRegistryUser Get(string name, Input<string> id, CloudProjectContainerRegistryUserState? state, CustomResourceOptions? opts = null)
public static CloudProjectContainerRegistryUser get(String name, Output<String> id, CloudProjectContainerRegistryUserState 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
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.