RegistryArgs

data class RegistryArgs(val adminEnabled: Output<Boolean>? = null, val anonymousPullEnabled: Output<Boolean>? = null, val dataEndpointEnabled: Output<Boolean>? = null, val encryption: Output<RegistryEncryptionArgs>? = null, val exportPolicyEnabled: Output<Boolean>? = null, val georeplications: Output<List<RegistryGeoreplicationArgs>>? = null, val identity: Output<RegistryIdentityArgs>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val networkRuleBypassOption: Output<String>? = null, val networkRuleSet: Output<RegistryNetworkRuleSetArgs>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val quarantinePolicyEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val retentionPolicy: Output<RegistryRetentionPolicyArgs>? = null, val sku: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val trustPolicy: Output<RegistryTrustPolicyArgs>? = null, val zoneRedundancyEnabled: Output<Boolean>? = null) : ConvertibleToJava<RegistryArgs>

Manages an Azure Container Registry.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.Registry;
import com.pulumi.azure.containerservice.RegistryArgs;
import com.pulumi.azure.containerservice.inputs.RegistryGeoreplicationArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var acr = new Registry("acr", RegistryArgs.builder()
.resourceGroupName(example.name())
.location(example.location())
.sku("Premium")
.adminEnabled(false)
.georeplications(
RegistryGeoreplicationArgs.builder()
.location("East US")
.zoneRedundancyEnabled(true)
.tags()
.build(),
RegistryGeoreplicationArgs.builder()
.location("North Europe")
.zoneRedundancyEnabled(true)
.tags()
.build())
.build());
}
}

Encryption)

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azure.keyvault.KeyvaultFunctions;
import com.pulumi.azure.keyvault.inputs.GetKeyArgs;
import com.pulumi.azure.containerservice.Registry;
import com.pulumi.azure.containerservice.RegistryArgs;
import com.pulumi.azure.containerservice.inputs.RegistryIdentityArgs;
import com.pulumi.azure.containerservice.inputs.RegistryEncryptionArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
final var exampleKey = KeyvaultFunctions.getKey(GetKeyArgs.builder()
.name("super-secret")
.keyVaultId(data.azurerm_key_vault().existing().id())
.build());
var acr = new Registry("acr", RegistryArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku("Premium")
.identity(RegistryIdentityArgs.builder()
.type("UserAssigned")
.identityIds(exampleUserAssignedIdentity.id())
.build())
.encryption(RegistryEncryptionArgs.builder()
.enabled(true)
.keyVaultKeyId(exampleKey.applyValue(getKeyResult -> getKeyResult.id()))
.identityClientId(exampleUserAssignedIdentity.clientId())
.build())
.build());
}
}

Attaching A Container Registry To A Kubernetes Cluster)

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.Registry;
import com.pulumi.azure.containerservice.RegistryArgs;
import com.pulumi.azure.containerservice.KubernetesCluster;
import com.pulumi.azure.containerservice.KubernetesClusterArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleRegistry = new Registry("exampleRegistry", RegistryArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku("Premium")
.build());
var exampleKubernetesCluster = new KubernetesCluster("exampleKubernetesCluster", KubernetesClusterArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.dnsPrefix("exampleaks1")
.defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
.name("default")
.nodeCount(1)
.vmSize("Standard_D2_v2")
.build())
.identity(KubernetesClusterIdentityArgs.builder()
.type("SystemAssigned")
.build())
.tags(Map.of("Environment", "Production"))
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.principalId(exampleKubernetesCluster.kubeletIdentity().applyValue(kubeletIdentity -> kubeletIdentity.objectId()))
.roleDefinitionName("AcrPull")
.scope(exampleRegistry.id())
.skipServicePrincipalAadCheck(true)
.build());
}
}

Import

Container Registries can be imported using the resource id, e.g.

$ pulumi import azure:containerservice/registry:Registry example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerRegistry/registries/myregistry1

Constructors

Link copied to clipboard
fun RegistryArgs(adminEnabled: Output<Boolean>? = null, anonymousPullEnabled: Output<Boolean>? = null, dataEndpointEnabled: Output<Boolean>? = null, encryption: Output<RegistryEncryptionArgs>? = null, exportPolicyEnabled: Output<Boolean>? = null, georeplications: Output<List<RegistryGeoreplicationArgs>>? = null, identity: Output<RegistryIdentityArgs>? = null, location: Output<String>? = null, name: Output<String>? = null, networkRuleBypassOption: Output<String>? = null, networkRuleSet: Output<RegistryNetworkRuleSetArgs>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, quarantinePolicyEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, retentionPolicy: Output<RegistryRetentionPolicyArgs>? = null, sku: Output<String>? = null, tags: Output<Map<String, String>>? = null, trustPolicy: Output<RegistryTrustPolicyArgs>? = null, zoneRedundancyEnabled: Output<Boolean>? = null)

Functions

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

Properties

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

Specifies whether the admin user is enabled. Defaults to false.

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

Whether allows anonymous (unauthenticated) pull access to this Container Registry? This is only supported on resources with the Standard or Premium SKU.

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

Whether to enable dedicated data endpoints for this Container Registry? This is only supported on resources with the Premium SKU.

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

An encryption block as documented below.

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

Boolean value that indicates whether export policy is enabled. Defaults to true. In order to set it to false, make sure the public_network_access_enabled is also set to false.

Link copied to clipboard

A georeplications block as documented below.

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

An identity block as defined below.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Specifies the name of the Container Registry. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.

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

Whether to allow trusted Azure services to access a network restricted Container Registry? Possible values are None and AzureServices. Defaults to AzureServices.

Link copied to clipboard

A network_rule_set block as documented below.

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

Whether public network access is allowed for the container registry. Defaults to true.

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

Boolean value that indicates whether quarantine policy is enabled.

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

The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.

Link copied to clipboard

A retention_policy block as documented below.

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

The SKU name of the container registry. Possible values are Basic, Standard and Premium.

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

A mapping of tags to assign to the resource.

Link copied to clipboard

A trust_policy block as documented below.

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

Whether zone redundancy is enabled for this Container Registry? Changing this forces a new resource to be created. Defaults to false.