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

azurerm_log_analytics_linked_storage_account does not suppress cammel case difference #18546

Closed
1 task done
Nepomuceno opened this issue Sep 27, 2022 · 2 comments
Closed
1 task done

Comments

@Nepomuceno
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

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 Version

1.3.0

AzureRM Provider Version

3,23.0

Affected Resource(s)/Data Source(s)

azurerm_log_analytics_linked_storage_account

Terraform Configuration Files

provider azurerm {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "examplesa5436qa"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "GRS"
}

resource "azurerm_log_analytics_workspace" "example" {
  name                = "exampleworkspace"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "PerGB2018"
}

resource "azurerm_log_analytics_linked_storage_account" "example" {
  data_source_type      = "customlogs"
  resource_group_name   = azurerm_resource_group.example.name
  workspace_resource_id = azurerm_log_analytics_workspace.example.id
  storage_account_ids   = [azurerm_storage_account.example.id]
}

Debug Output/Panic Output

# azurerm_log_analytics_linked_storage_account.mgmt_law_linked_sa_alerts must be replaced
-/+ resource "azurerm_log_analytics_linked_storage_account" "mgmt_law_linked_sa_alerts" {
      ~ data_source_type      = "Alerts" -> "alerts" # forces replacement
      ~ id                    = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bz-test-jb-mgmt/providers/Microsoft.OperationalInsights/workspaces/bz-test-jb-la/linkedStorageAccounts/alerts" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # azurerm_log_analytics_linked_storage_account.mgmt_law_linked_sa_azurewatson must be replaced
-/+ resource "azurerm_log_analytics_linked_storage_account" "mgmt_law_linked_sa_azurewatson" {
      ~ data_source_type      = "AzureWatson" -> "azurewatson" # forces replacement
      ~ id                    = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bz-test-jb-mgmt/providers/Microsoft.OperationalInsights/workspaces/bz-test-jb-la/linkedStorageAccounts/azurewatson" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # azurerm_log_analytics_linked_storage_account.mgmt_law_linked_sa_customlogs must be replaced
-/+ resource "azurerm_log_analytics_linked_storage_account" "mgmt_law_linked_sa_customlogs" {
      ~ data_source_type      = "CustomLogs" -> "customlogs" # forces replacement
      ~ id                    = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bz-test-jb-mgmt/providers/Microsoft.OperationalInsights/workspaces/bz-test-jb-la/linkedStorageAccounts/customlogs" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # azurerm_log_analytics_linked_storage_account.mgmt_law_linked_sa_ingestion must be replaced
-/+ resource "azurerm_log_analytics_linked_storage_account" "mgmt_law_linked_sa_ingestion" {
      ~ data_source_type      = "Ingestion" -> "ingestion" # forces replacement
      ~ id                    = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bz-test-jb-mgmt/providers/Microsoft.OperationalInsights/workspaces/bz-test-jb-la/linkedStorageAccounts/ingestion" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

  # azurerm_log_analytics_linked_storage_account.mgmt_law_linked_sa_query must be replaced
-/+ resource "azurerm_log_analytics_linked_storage_account" "mgmt_law_linked_sa_query" {
      ~ data_source_type      = "Query" -> "query" # forces replacement
      ~ id                    = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bz-test-jb-mgmt/providers/Microsoft.OperationalInsights/workspaces/bz-test-jb-la/linkedStorageAccounts/query" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

Expected Behaviour

No changes should be required since this resource is case insensitive in the data_source_type property.

Actual Behaviour

A replace for the resource ti is triggered.

Steps to Reproduce

Add the resouce through cli or something else that makes it cammel case.

terraform plan

Important Factoids

No response

References

No response

@Nepomuceno
Copy link
Contributor Author

Fixed by #18116

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant