ovh.CloudProjectContainerregistryIam
Explore with Pulumi AI
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:
- Registry
Id string - 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 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 string - 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 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 String - The ID of the Managed Private Registry. Changing this value recreates the resource.
- delete
Users 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.
- service
Name 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 string - The ID of the Managed Private Registry. Changing this value recreates the resource.
- delete
Users 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.
- service
Name 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.
- registry
Id String - The ID of the Managed Private Registry. Changing this value recreates the resource.
- delete
Users 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.
- service
Name 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:
- Iam
Enabled bool - Id string
- The provider-assigned unique ID for this managed resource.
- Iam
Enabled bool - Id string
- The provider-assigned unique ID for this managed resource.
- iam
Enabled Boolean - id String
- The provider-assigned unique ID for this managed resource.
- iam
Enabled 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.
- iam
Enabled 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.
- 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 string - The ID of the Managed Private Registry. Changing this value recreates the resource.
- Service
Name 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 string - The ID of the Managed Private Registry. Changing this value recreates the resource.
- Service
Name 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 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.
- iam
Enabled Boolean - registry
Id String - The ID of the Managed Private Registry. Changing this value recreates the resource.
- service
Name 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 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.
- iam
Enabled boolean - registry
Id string - The ID of the Managed Private Registry. Changing this value recreates the resource.
- service
Name 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.
- delete
Users 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.
- iam
Enabled Boolean - registry
Id String - The ID of the Managed Private Registry. Changing this value recreates the resource.
- service
Name 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.