diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index caf62efa72a..3c29d46fb25 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -24,6 +24,10 @@ Release History * Fix #6371: Support filename and environment variable completion in Bash +**Network** + +* Fix #2092: az network dns record-set add/remove: add warning when record-set is not found. In the future, an extra argument will be supported to confirm this auto creation. + **Storage** * Add a new command group `az storage share-rm` to use the Microsoft.Storage resource provider for Azure file share management operations. diff --git a/src/azure-cli/azure/cli/command_modules/network/custom.py b/src/azure-cli/azure/cli/command_modules/network/custom.py index 3c783931520..17616d7a413 100644 --- a/src/azure-cli/azure/cli/command_modules/network/custom.py +++ b/src/azure-cli/azure/cli/command_modules/network/custom.py @@ -1945,6 +1945,8 @@ def _add_save_record(cmd, record, record_type, record_set_name, resource_group_n try: record_set = ncf.get(resource_group_name, zone_name, record_set_name, record_type) except CloudError: + logger.warning("The record set doesn't exist and is automatically created. " + "In the future, an extra argument will be supported to confirm this auto creation.") RecordSet = cmd.get_models('RecordSet', resource_type=ResourceType.MGMT_NETWORK_DNS) record_set = RecordSet()