Azure Container Registry Scope Map
This page shows how to write Terraform and Azure Resource Manager for Container Registry Scope Map and write them securely.
azurerm_container_registry_scope_map (Terraform)
The Registry Scope Map in Container can be configured in Terraform with the resource name azurerm_container_registry_scope_map
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
Explanation in Terraform Registry
Manages an Azure Container Registry scope map. Scope Maps are a preview feature only available in Premium SKU Container registries.
resource "azurerm_resource_group" "example" { name = "example-resource-group" location = "West Europe" } resource "azurerm_container_registry" "example" { name = "example-registry" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location sku = "Premium" admin_enabled = false georeplication_locations = ["East US", "West Europe"] } resource "azurerm_container_registry_scope_map" "example" { name = "example-scope-map" container_registry_name = azurerm_container_registry.acr.name resource_group_name = azurerm_resource_group.rg.name actions = [ "repositories/repo1/content/read", "repositories/repo1/content/write" ] }
Tips: Best Practices for The Other Azure Container Resources
In addition to the azurerm_kubernetes_cluster, Azure Container has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_kubernetes_cluster
Ensure to enable logging for AKS
It is better to enable AKS logging to Azure Monitoring. This provides useful information regarding access and usage.
Microsoft.ContainerRegistry/registries/scopeMaps (Azure Resource Manager)
The registries/scopeMaps in Microsoft.ContainerRegistry can be configured in Azure Resource Manager with the resource name Microsoft.ContainerRegistry/registries/scopeMaps
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.