Skip to content

az resource tag failing to update General Purpose V2 SQL Managed Instance #30095

Description

@zoeperryman

Describe the bug

Attempting to update the tags on a General Purpose V2 SQL Managed Instance fails using az resource tag. The managed instance itself is deployed and updated via bicep templates, but at the end of our deployment script we update some tags on it.

Command
az resource tag -g MyGroup -n MyServer --tags MyTag=TagValue --resource-type "Microsoft.Sql/managedInstances"

Errors:

(GPTargetEditionAndUnspecifiedGPV2NotAllowedInUpdateOFGPV2MI) Combination of General Purpose target edition (sku.name/sku.tier parameters) and unspecified value for the isGeneralPurposeV2 parameter is not allowed in the update operation of General Purpose V2 Managed Instance.
Code: GPTargetEditionAndUnspecifiedGPV2NotAllowedInUpdateOFGPV2MI
Message: Combination of General Purpose target edition (sku.name/sku.tier parameters) and unspecified value for the isGeneralPurposeV2 parameter is not allowed in the update operation of General Purpose V2 Managed Instance.

Server Details
Running az sql mi show on the managed instance shows the following details (snipped to just relevant details)

{
  "isGeneralPurposeV2": true,
  "sku": {
    "capacity": 4,
    "family": "Gen5",
    "name": "GP_Gen5",
    "size": null,
    "tier": "GeneralPurpose"
  },
  "storageIops": 6144,
  "storageSizeInGb": 2048,
  "storageThroughputMbps": 145,
}

We can see that the error is complaining that there is an unspecified value for the isGeneralPurposeV2 parameter. I'm not sure what the command is doing internally and why updating tags is triggering this, but you can see that the isGeneralPurposeV2 is specified on the current server details.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Create a General Purpose V2 managed instance
  • Run az resource tag -g MyGroup -n MyServer --tags MyTag=TagValue --resource-type "Microsoft.Sql/managedInstances"

Expected Behavior

Tags are updated without an error being raised.

This works correctly on our non-V2 managed instances, or though I notice that updating the tags seems to trigger a scaling event instead of just adding some tags.

Environment Summary

Windows-10-10.0.22631-SP0
Python 3.11.8
Installer: MSI

azure-cli 2.65.0

Extensions:
datafactory 1.0.0
datamigration 1.0.0b1
maintenance 1.6.0
scheduled-query 1.0.0b1

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Additional Context

Related Issues

This seems similar to #29013

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botSQLaz sqlService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions