Terraform-provider-azurerm: log_analytics_workspace_linked_service tags not applying

Created on 14 Jan 2019  路  4Comments  路  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

  • Terraform v0.11.11
  • provider.azurerm v1.21.0

Affected Resource(s)

  • azurerm_log_analytics_workspace_linked_service

Terraform Configuration Files

resource "azurerm_log_analytics_workspace_linked_service" "linked_service" {
  workspace_name      = "${var.la_workspace_name}"
  linked_service_name = "automation"
  resource_group_name = "${var.rg_name}"

  linked_service_properties {
    resource_id = "${automation_account.automation_account_id}"
  }

  tags {
    tag1 = "1"
    tag2 = "2"
    tag3 = "3"
  }
}

Expected Behavior

Tags should be attached to the resource

Actual Behavior

No tags are attached to resource (noticed via state file). This causes subsequent applies to attempt to update the resource.

Steps to Reproduce

  1. Deploy an azurerm_log_analytics_workspace_linked_service resource with tags
  2. Evaluate terraform.tfstate
  3. Run terraform apply with no changes

References

Resource API shows that tags are supported, both for create/update and get.

  • #0000
bug serviclog-analytics upstream-microsoft

All 4 comments

@philbal611 Thanks for opening this issue, I can confirm it's reproducible and it's because of empty tags returned in Azure Operational Insights API. https://github.com/Azure/azure-sdk-for-go/issues/3883 is opened to track this issue.

Perfect, thanks!

Hi @philbal611 , the API issue was closed and released in new SDK version. I have verified the issue was fix in latest Provider version, please have a check. By the way, old resource "azurerm_log_analytics_workspace_linked_service" was migrated to "azurerm_log_analytics_linked_service".
Thanks in advance, thanks for @metacpp .

I'm still seeing this issue using azurerm_log_analytics_linked_service using provider 2.37.0.

Was this page helpful?
0 / 5 - 0 ratings