1. Packages
  2. Azure Classic
  3. API Docs
  4. containerservice
  5. RegistryScopeMap

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.containerservice.RegistryScopeMap

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Manages an Azure Container Registry scope map. Scope Maps are a preview feature only available in Premium SKU Container registries.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resource-group",
        location: "West Europe",
    });
    const exampleRegistry = new azure.containerservice.Registry("example", {
        name: "exampleregistry",
        resourceGroupName: example.name,
        location: example.location,
        sku: "Premium",
        adminEnabled: false,
        georeplications: [
            {
                location: "East US",
            },
            {
                location: "West Europe",
            },
        ],
    });
    const exampleRegistryScopeMap = new azure.containerservice.RegistryScopeMap("example", {
        name: "example-scope-map",
        containerRegistryName: exampleRegistry.name,
        resourceGroupName: example.name,
        actions: [
            "repositories/repo1/content/read",
            "repositories/repo1/content/write",
        ],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resource-group",
        location="West Europe")
    example_registry = azure.containerservice.Registry("example",
        name="exampleregistry",
        resource_group_name=example.name,
        location=example.location,
        sku="Premium",
        admin_enabled=False,
        georeplications=[
            azure.containerservice.RegistryGeoreplicationArgs(
                location="East US",
            ),
            azure.containerservice.RegistryGeoreplicationArgs(
                location="West Europe",
            ),
        ])
    example_registry_scope_map = azure.containerservice.RegistryScopeMap("example",
        name="example-scope-map",
        container_registry_name=example_registry.name,
        resource_group_name=example.name,
        actions=[
            "repositories/repo1/content/read",
            "repositories/repo1/content/write",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resource-group"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleRegistry, err := containerservice.NewRegistry(ctx, "example", &containerservice.RegistryArgs{
    			Name:              pulumi.String("exampleregistry"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			Sku:               pulumi.String("Premium"),
    			AdminEnabled:      pulumi.Bool(false),
    			Georeplications: containerservice.RegistryGeoreplicationArray{
    				&containerservice.RegistryGeoreplicationArgs{
    					Location: pulumi.String("East US"),
    				},
    				&containerservice.RegistryGeoreplicationArgs{
    					Location: pulumi.String("West Europe"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = containerservice.NewRegistryScopeMap(ctx, "example", &containerservice.RegistryScopeMapArgs{
    			Name:                  pulumi.String("example-scope-map"),
    			ContainerRegistryName: exampleRegistry.Name,
    			ResourceGroupName:     example.Name,
    			Actions: pulumi.StringArray{
    				pulumi.String("repositories/repo1/content/read"),
    				pulumi.String("repositories/repo1/content/write"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resource-group",
            Location = "West Europe",
        });
    
        var exampleRegistry = new Azure.ContainerService.Registry("example", new()
        {
            Name = "exampleregistry",
            ResourceGroupName = example.Name,
            Location = example.Location,
            Sku = "Premium",
            AdminEnabled = false,
            Georeplications = new[]
            {
                new Azure.ContainerService.Inputs.RegistryGeoreplicationArgs
                {
                    Location = "East US",
                },
                new Azure.ContainerService.Inputs.RegistryGeoreplicationArgs
                {
                    Location = "West Europe",
                },
            },
        });
    
        var exampleRegistryScopeMap = new Azure.ContainerService.RegistryScopeMap("example", new()
        {
            Name = "example-scope-map",
            ContainerRegistryName = exampleRegistry.Name,
            ResourceGroupName = example.Name,
            Actions = new[]
            {
                "repositories/repo1/content/read",
                "repositories/repo1/content/write",
            },
        });
    
    });
    
    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 com.pulumi.azure.containerservice.RegistryScopeMap;
    import com.pulumi.azure.containerservice.RegistryScopeMapArgs;
    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()        
                .name("example-resource-group")
                .location("West Europe")
                .build());
    
            var exampleRegistry = new Registry("exampleRegistry", RegistryArgs.builder()        
                .name("exampleregistry")
                .resourceGroupName(example.name())
                .location(example.location())
                .sku("Premium")
                .adminEnabled(false)
                .georeplications(            
                    RegistryGeoreplicationArgs.builder()
                        .location("East US")
                        .build(),
                    RegistryGeoreplicationArgs.builder()
                        .location("West Europe")
                        .build())
                .build());
    
            var exampleRegistryScopeMap = new RegistryScopeMap("exampleRegistryScopeMap", RegistryScopeMapArgs.builder()        
                .name("example-scope-map")
                .containerRegistryName(exampleRegistry.name())
                .resourceGroupName(example.name())
                .actions(            
                    "repositories/repo1/content/read",
                    "repositories/repo1/content/write")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resource-group
          location: West Europe
      exampleRegistry:
        type: azure:containerservice:Registry
        name: example
        properties:
          name: exampleregistry
          resourceGroupName: ${example.name}
          location: ${example.location}
          sku: Premium
          adminEnabled: false
          georeplications:
            - location: East US
            - location: West Europe
      exampleRegistryScopeMap:
        type: azure:containerservice:RegistryScopeMap
        name: example
        properties:
          name: example-scope-map
          containerRegistryName: ${exampleRegistry.name}
          resourceGroupName: ${example.name}
          actions:
            - repositories/repo1/content/read
            - repositories/repo1/content/write
    

    Create RegistryScopeMap Resource

    new RegistryScopeMap(name: string, args: RegistryScopeMapArgs, opts?: CustomResourceOptions);
    @overload
    def RegistryScopeMap(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         actions: Optional[Sequence[str]] = None,
                         container_registry_name: Optional[str] = None,
                         description: Optional[str] = None,
                         name: Optional[str] = None,
                         resource_group_name: Optional[str] = None)
    @overload
    def RegistryScopeMap(resource_name: str,
                         args: RegistryScopeMapArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewRegistryScopeMap(ctx *Context, name string, args RegistryScopeMapArgs, opts ...ResourceOption) (*RegistryScopeMap, error)
    public RegistryScopeMap(string name, RegistryScopeMapArgs args, CustomResourceOptions? opts = null)
    public RegistryScopeMap(String name, RegistryScopeMapArgs args)
    public RegistryScopeMap(String name, RegistryScopeMapArgs args, CustomResourceOptions options)
    
    type: azure:containerservice:RegistryScopeMap
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RegistryScopeMapArgs
    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 RegistryScopeMapArgs
    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 RegistryScopeMapArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegistryScopeMapArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegistryScopeMapArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RegistryScopeMap 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 RegistryScopeMap resource accepts the following input properties:

    Actions List<string>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    ContainerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    Description string
    The description of the Container Registry.
    Name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    Actions []string
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    ContainerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    Description string
    The description of the Container Registry.
    Name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    actions List<String>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName String
    The name of the Container Registry. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    description String
    The description of the Container Registry.
    name String
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    actions string[]
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    description string
    The description of the Container Registry.
    name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    actions Sequence[str]
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    container_registry_name str
    The name of the Container Registry. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    description str
    The description of the Container Registry.
    name str
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    actions List<String>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName String
    The name of the Container Registry. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    description String
    The description of the Container Registry.
    name String
    Specifies the name of the scope map. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegistryScopeMap resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RegistryScopeMap Resource

    Get an existing RegistryScopeMap 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?: RegistryScopeMapState, opts?: CustomResourceOptions): RegistryScopeMap
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[str]] = None,
            container_registry_name: Optional[str] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None) -> RegistryScopeMap
    func GetRegistryScopeMap(ctx *Context, name string, id IDInput, state *RegistryScopeMapState, opts ...ResourceOption) (*RegistryScopeMap, error)
    public static RegistryScopeMap Get(string name, Input<string> id, RegistryScopeMapState? state, CustomResourceOptions? opts = null)
    public static RegistryScopeMap get(String name, Output<String> id, RegistryScopeMapState 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:
    Actions List<string>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    ContainerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    Description string
    The description of the Container Registry.
    Name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    Actions []string
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    ContainerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    Description string
    The description of the Container Registry.
    Name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    actions List<String>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName String
    The name of the Container Registry. Changing this forces a new resource to be created.
    description String
    The description of the Container Registry.
    name String
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    actions string[]
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName string
    The name of the Container Registry. Changing this forces a new resource to be created.
    description string
    The description of the Container Registry.
    name string
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    actions Sequence[str]
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    container_registry_name str
    The name of the Container Registry. Changing this forces a new resource to be created.
    description str
    The description of the Container Registry.
    name str
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.
    actions List<String>
    A list of actions to attach to the scope map (e.g. repo/content/read, repo2/content/delete).
    containerRegistryName String
    The name of the Container Registry. Changing this forces a new resource to be created.
    description String
    The description of the Container Registry.
    name String
    Specifies the name of the scope map. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Container Registry token. Changing this forces a new resource to be created.

    Import

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

    $ pulumi import azure:containerservice/registryScopeMap:RegistryScopeMap example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerRegistry/registries/myregistry1/scopeMaps/scopemap1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi