Registry
Manages an Azure Container Registry.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var acr = new Azure.ContainerService.Registry("acr", new Azure.ContainerService.RegistryArgs
{
ResourceGroupName = rg.Name,
Location = rg.Location,
Sku = "Premium",
AdminEnabled = false,
GeoreplicationLocations =
{
"East US",
"West Europe",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
Location: pulumi.String("West US"),
})
if err != nil {
return err
}
_, err = containerservice.NewRegistry(ctx, "acr", &containerservice.RegistryArgs{
ResourceGroupName: rg.Name,
Location: rg.Location,
Sku: pulumi.String("Premium"),
AdminEnabled: pulumi.Bool(false),
GeoreplicationLocations: pulumi.StringArray{
pulumi.String("East US"),
pulumi.String("West Europe"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
rg = azure.core.ResourceGroup("rg", location="West US")
acr = azure.containerservice.Registry("acr",
resource_group_name=rg.name,
location=rg.location,
sku="Premium",
admin_enabled=False,
georeplication_locations=[
"East US",
"West Europe",
])import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const rg = new azure.core.ResourceGroup("rg", {location: "West US"});
const acr = new azure.containerservice.Registry("acr", {
resourceGroupName: rg.name,
location: rg.location,
sku: "Premium",
adminEnabled: false,
georeplicationLocations: [
"East US",
"West Europe",
],
});Create a Registry Resource
new Registry(name: string, args: RegistryArgs, opts?: CustomResourceOptions);def Registry(resource_name, opts=None, admin_enabled=None, georeplication_locations=None, location=None, name=None, network_rule_set=None, resource_group_name=None, sku=None, storage_account_id=None, tags=None, __props__=None);func NewRegistry(ctx *Context, name string, args RegistryArgs, opts ...ResourceOption) (*Registry, error)public Registry(string name, RegistryArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RegistryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegistryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Registry Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Registry resource accepts the following input properties:
- Resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- Admin
Enabled bool Specifies whether the admin user is enabled. Defaults to
false.- Georeplication
Locations List<string> A list of Azure locations where the container registry should be geo-replicated.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- Network
Rule RegistrySet Network Rule Set Args A
network_rule_setblock as documented below.- Sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- Storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- Admin
Enabled bool Specifies whether the admin user is enabled. Defaults to
false.- Georeplication
Locations []string A list of Azure locations where the container registry should be geo-replicated.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- Network
Rule RegistrySet Network Rule Set A
network_rule_setblock as documented below.- Sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- Storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- map[string]string
A mapping of tags to assign to the resource.
- resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- admin
Enabled boolean Specifies whether the admin user is enabled. Defaults to
false.- georeplication
Locations string[] A list of Azure locations where the container registry should be geo-replicated.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- network
Rule RegistrySet Network Rule Set A
network_rule_setblock as documented below.- sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- resource_
group_ strname The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- admin_
enabled bool Specifies whether the admin user is enabled. Defaults to
false.- georeplication_
locations List[str] A list of Azure locations where the container registry should be geo-replicated.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- network_
rule_ Dict[Registryset Network Rule Set] A
network_rule_setblock as documented below.- sku str
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- storage_
account_ strid The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Registry resource produces the following output properties:
- Admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- Admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Login
Server string The URL that can be used to log into the container registry.
- Admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- Admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- Id string
- The provider-assigned unique ID for this managed resource.
- Login
Server string The URL that can be used to log into the container registry.
- admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- id string
- The provider-assigned unique ID for this managed resource.
- login
Server string The URL that can be used to log into the container registry.
- admin_
password str The Password associated with the Container Registry Admin account - if the admin account is enabled.
- admin_
username str The Username associated with the Container Registry Admin account - if the admin account is enabled.
- id str
- The provider-assigned unique ID for this managed resource.
- login_
server str The URL that can be used to log into the container registry.
Look up an Existing Registry Resource
Get an existing Registry 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?: RegistryState, opts?: CustomResourceOptions): Registrystatic get(resource_name, id, opts=None, admin_enabled=None, admin_password=None, admin_username=None, georeplication_locations=None, location=None, login_server=None, name=None, network_rule_set=None, resource_group_name=None, sku=None, storage_account_id=None, tags=None, __props__=None);func GetRegistry(ctx *Context, name string, id IDInput, state *RegistryState, opts ...ResourceOption) (*Registry, error)public static Registry Get(string name, Input<string> id, RegistryState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Admin
Enabled bool Specifies whether the admin user is enabled. Defaults to
false.- Admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- Admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- Georeplication
Locations List<string> A list of Azure locations where the container registry should be geo-replicated.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Login
Server string The URL that can be used to log into the container registry.
- Name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- Network
Rule RegistrySet Network Rule Set Args A
network_rule_setblock as documented below.- Resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- Sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- Storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Admin
Enabled bool Specifies whether the admin user is enabled. Defaults to
false.- Admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- Admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- Georeplication
Locations []string A list of Azure locations where the container registry should be geo-replicated.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Login
Server string The URL that can be used to log into the container registry.
- Name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- Network
Rule RegistrySet Network Rule Set A
network_rule_setblock as documented below.- Resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- Sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- Storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- map[string]string
A mapping of tags to assign to the resource.
- admin
Enabled boolean Specifies whether the admin user is enabled. Defaults to
false.- admin
Password string The Password associated with the Container Registry Admin account - if the admin account is enabled.
- admin
Username string The Username associated with the Container Registry Admin account - if the admin account is enabled.
- georeplication
Locations string[] A list of Azure locations where the container registry should be geo-replicated.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- login
Server string The URL that can be used to log into the container registry.
- name string
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- network
Rule RegistrySet Network Rule Set A
network_rule_setblock as documented below.- resource
Group stringName The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- sku string
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- storage
Account stringId The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- admin_
enabled bool Specifies whether the admin user is enabled. Defaults to
false.- admin_
password str The Password associated with the Container Registry Admin account - if the admin account is enabled.
- admin_
username str The Username associated with the Container Registry Admin account - if the admin account is enabled.
- georeplication_
locations List[str] A list of Azure locations where the container registry should be geo-replicated.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- login_
server str The URL that can be used to log into the container registry.
- name str
Specifies the name of the Container Registry. Changing this forces a new resource to be created.
- network_
rule_ Dict[Registryset Network Rule Set] A
network_rule_setblock as documented below.- resource_
group_ strname The name of the resource group in which to create the Container Registry. Changing this forces a new resource to be created.
- sku str
The SKU name of the container registry. Possible values are
Basic,StandardandPremium.Classic(which was previouslyBasic) is supported only for existing resources.- storage_
account_ strid The ID of a Storage Account which must be located in the same Azure Region as the Container Registry.
- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
RegistryNetworkRuleSet
- Default
Action string The behaviour for requests matching no rules. Either
AlloworDeny. Defaults toAllow- Ip
Rules List<RegistryNetwork Rule Set Ip Rule Args> One or more
ip_ruleblocks as defined below.- Virtual
Networks List<RegistryNetwork Rule Set Virtual Network Args> One or more
virtual_networkblocks as defined below.
- Default
Action string The behaviour for requests matching no rules. Either
AlloworDeny. Defaults toAllow- Ip
Rules []RegistryNetwork Rule Set Ip Rule One or more
ip_ruleblocks as defined below.- Virtual
Networks []RegistryNetwork Rule Set Virtual Network One or more
virtual_networkblocks as defined below.
- default
Action string The behaviour for requests matching no rules. Either
AlloworDeny. Defaults toAllow- ip
Rules RegistryNetwork Rule Set Ip Rule[] One or more
ip_ruleblocks as defined below.- virtual
Networks RegistryNetwork Rule Set Virtual Network[] One or more
virtual_networkblocks as defined below.
- default_
action str The behaviour for requests matching no rules. Either
AlloworDeny. Defaults toAllow- ip_
rules List[RegistryNetwork Rule Set Ip Rule] One or more
ip_ruleblocks as defined below.- virtual
Networks List[RegistryNetwork Rule Set Virtual Network] One or more
virtual_networkblocks as defined below.
RegistryNetworkRuleSetIpRule
RegistryNetworkRuleSetVirtualNetwork
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.