Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagging of Microsoft.Storage/storageAccounts/fileServices not supported #674

Open
mloskot opened this issue Nov 19, 2024 · 3 comments
Open

Comments

@mloskot
Copy link

mloskot commented Nov 19, 2024

The API reference at https://learn.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts/fileservices does not list tags or any other property that would allow to tag the Microsoft.Storage/storageAccounts/fileServices resource.

Such resource can be accessed via the Portal:

https://portal.azure.com/#@cadcorp.cloud/resource/subscriptions/{id}/resourcegroups/{group}/providers/microsoft.storage/storageaccounts/{account}/fileservices/default/overview

where {id}, {group} and {account} are placeholders, where tagging is clearly allowed:

Image

How to add tags to this resource but with IaC?

@ms-henglu
Copy link
Member

Hi @mloskot ,

Thank you for taking time to report this issue!

It seems it's a bug on the Portal side. Though the tags management showed in the Portal, it's not working.

Behind the scenes, it tries to use the below API to manage the tags(but the file service doesn't support it):

resource "azapi_resource" "tags" {
  type      = "Microsoft.Resources/tags@2024-07-01"
  parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Storage/storageAccounts/examplesa/fileServices/default"
  name      = "default"
  body = {
    properties = {
      tags = {
        dev = "true"
      }
    }
  }
}

@mloskot
Copy link
Author

mloskot commented Nov 19, 2024

Hi @ms-henglu, thank you very much for your explanation.
This shortcoming is quite unfortunate as it seems to be biasing Cost Analysis report.
I have carefully tagged all my resources with customer tag, then I realised there is number of resources which

  • are missing the customer tag
  • generate significant cost

and those costly resources seem to be of type of Microsoft.Storage/storageAccounts/fileServices:

Image

That is, if I click on any of the resource in the table, it takes me to Microsoft.Storage/storageAccounts/fileServices page of it:

Image

Would you have any recommendation how to deal with this? How to get the resource (cost per that resource) tagged properly?
Does it qualify for Microsoft Azure support ticket?

@ms-henglu
Copy link
Member

Hi @mloskot ,

I'd recommend to open an Azure support ticket for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants