quickstarts/Microsoft.ContainerRegistry/Registries/main.tf (32 lines of code) (raw):
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azurerm" {
features {}
}
provider "azapi" {
}
resource "azurerm_resource_group" "test" {
name = "acctest-rg"
location = "West Europe"
}
resource "azurerm_container_registry" "acr" {
name = "acctest"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
sku = "Premium"
admin_enabled = false
}
resource "azapi_update_resource" "test" {
type = "Microsoft.ContainerRegistry/registries@2020-11-01-preview"
resource_id = azurerm_container_registry.acr.id
body = {
properties = {
anonymousPullEnabled = true
}
}
}