RegistryArgs

data class RegistryArgs(val adminUserEnabled: Output<Boolean>? = null, val dataEndpointEnabled: Output<Boolean>? = null, val encryption: Output<EncryptionPropertyArgs>? = null, val identity: Output<IdentityPropertiesArgs>? = null, val location: Output<String>? = null, val networkRuleBypassOptions: Output<Either<String, NetworkRuleBypassOptions>>? = null, val networkRuleSet: Output<NetworkRuleSetArgs>? = null, val policies: Output<PoliciesArgs>? = null, val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, val registryName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val zoneRedundancy: Output<Either<String, ZoneRedundancy>>? = null) : ConvertibleToJava<RegistryArgs>

An object that represents a container registry. Uses Azure REST API version 2022-12-01. In version 1.x of the Azure Native provider, it used API version 2019-05-01. Other available API versions: 2017-03-01, 2019-05-01, 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-11-01-preview.

Example Usage

RegistryCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var registry = new AzureNative.ContainerRegistry.Registry("registry", new()
{
AdminUserEnabled = true,
Location = "westus",
RegistryName = "myRegistry",
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.ContainerRegistry.Inputs.SkuArgs
{
Name = AzureNative.ContainerRegistry.SkuName.Standard,
},
Tags =
{
{ "key", "value" },
},
});
});
package main
import (
containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := containerregistry.NewRegistry(ctx, "registry", &containerregistry.RegistryArgs{
AdminUserEnabled: pulumi.Bool(true),
Location: pulumi.String("westus"),
RegistryName: pulumi.String("myRegistry"),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &containerregistry.SkuArgs{
Name: pulumi.String(containerregistry.SkuNameStandard),
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
})
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.azurenative.containerregistry.Registry;
import com.pulumi.azurenative.containerregistry.RegistryArgs;
import com.pulumi.azurenative.containerregistry.inputs.SkuArgs;
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 registry = new Registry("registry", RegistryArgs.builder()
.adminUserEnabled(true)
.location("westus")
.registryName("myRegistry")
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.name("Standard")
.build())
.tags(Map.of("key", "value"))
.build());
}
}

RegistryCreateZoneRedundant

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var registry = new AzureNative.ContainerRegistry.Registry("registry", new()
{
Location = "westus",
RegistryName = "myRegistry",
ResourceGroupName = "myResourceGroup",
Sku = new AzureNative.ContainerRegistry.Inputs.SkuArgs
{
Name = AzureNative.ContainerRegistry.SkuName.Standard,
},
Tags =
{
{ "key", "value" },
},
ZoneRedundancy = AzureNative.ContainerRegistry.ZoneRedundancy.Enabled,
});
});
package main
import (
containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := containerregistry.NewRegistry(ctx, "registry", &containerregistry.RegistryArgs{
Location: pulumi.String("westus"),
RegistryName: pulumi.String("myRegistry"),
ResourceGroupName: pulumi.String("myResourceGroup"),
Sku: &containerregistry.SkuArgs{
Name: pulumi.String(containerregistry.SkuNameStandard),
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
ZoneRedundancy: pulumi.String(containerregistry.ZoneRedundancyEnabled),
})
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.azurenative.containerregistry.Registry;
import com.pulumi.azurenative.containerregistry.RegistryArgs;
import com.pulumi.azurenative.containerregistry.inputs.SkuArgs;
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 registry = new Registry("registry", RegistryArgs.builder()
.location("westus")
.registryName("myRegistry")
.resourceGroupName("myResourceGroup")
.sku(SkuArgs.builder()
.name("Standard")
.build())
.tags(Map.of("key", "value"))
.zoneRedundancy("Enabled")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerregistry:Registry myRegistry /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}

Constructors

Link copied to clipboard
constructor(adminUserEnabled: Output<Boolean>? = null, dataEndpointEnabled: Output<Boolean>? = null, encryption: Output<EncryptionPropertyArgs>? = null, identity: Output<IdentityPropertiesArgs>? = null, location: Output<String>? = null, networkRuleBypassOptions: Output<Either<String, NetworkRuleBypassOptions>>? = null, networkRuleSet: Output<NetworkRuleSetArgs>? = null, policies: Output<PoliciesArgs>? = null, publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, registryName: Output<String>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null, zoneRedundancy: Output<Either<String, ZoneRedundancy>>? = null)

Properties

Link copied to clipboard
val adminUserEnabled: Output<Boolean>? = null

The value that indicates whether the admin user is enabled.

Link copied to clipboard
val dataEndpointEnabled: Output<Boolean>? = null

Enable a single data endpoint per region for serving data.

Link copied to clipboard
val encryption: Output<EncryptionPropertyArgs>? = null

The encryption settings of container registry.

Link copied to clipboard
val identity: Output<IdentityPropertiesArgs>? = null

The identity of the container registry.

Link copied to clipboard
val location: Output<String>? = null

The location of the resource. This cannot be changed after the resource is created.

Link copied to clipboard

Whether to allow trusted Azure services to access a network restricted registry.

Link copied to clipboard
val networkRuleSet: Output<NetworkRuleSetArgs>? = null

The network rule set for a container registry.

Link copied to clipboard
val policies: Output<PoliciesArgs>? = null

The policies for a container registry.

Link copied to clipboard
val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null

Whether or not public network access is allowed for the container registry.

Link copied to clipboard
val registryName: Output<String>? = null

The name of the container registry.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val sku: Output<SkuArgs>? = null

The SKU of the container registry.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

The tags of the resource.

Link copied to clipboard
val zoneRedundancy: Output<Either<String, ZoneRedundancy>>? = null

Whether or not zone redundancy is enabled for this container registry

Functions

Link copied to clipboard
open override fun toJava(): RegistryArgs