Skip to content

Can't delete DNS record with the Complete deployment mode. #23219

@antonGritsenko

Description

@antonGritsenko

This is autogenerated. Please review and update as needed.

Describe the bug

The DNS record is not deleted with the Complete deployment mode.

Command Name
az deployment group create

Errors:


To Reproduce:

  1. Create bicep file sample.dns.bicep:
param zoneName string  = 'my.local'
var defaultTtl = 3600

resource zone 'Microsoft.Network/dnsZones@2018-05-01' = {
  name: zoneName
  location: 'global'
}

resource _root_A 'Microsoft.Network/dnsZones/A@2018-05-01' = {
  name: '@'
  parent: zone
  properties: {
    TTL: defaultTtl
    ARecords: [
    {
        ipv4Address: '1.1.1.1'
      }
    ]
  }
}

  1. Run the deployment
    az deployment group create --name test1 --resource-group dns-test --template-file .\sample.dns.bicep --mode Complete
    All good, records created
  2. Change the file to (so remove the record):
param zoneName string  = 'my.local'
var defaultTtl = 3600

resource zone 'Microsoft.Network/dnsZones@2018-05-01' = {
  name: zoneName
  location: 'global'
}

  1. Run the deployment
    az deployment group create --name test1 --resource-group dns-test --template-file .\sample.dns.bicep --mode Complete

Deployment is OK, but record is still there.

Expected Behavior

DNS Record deleted

Environment Summary

Windows-10-10.0.19044-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.37.0 *

Extensions:
account 0.2.1
scheduled-query 0.5.0

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions