TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │ Error: A resource with the ID "/subscriptions/xxxxxxx/resourceGroups/rg-5e9709f5ec831d95/providers/Microsoft.OperationalInsights/workspaces/testlaworkspace" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_log_analytics_workspace" for more information.
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │ with azurerm_log_analytics_workspace.test,
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │ on main.tf line 76, in resource "azurerm_log_analytics_workspace" "test":
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │ 76: resource "azurerm_log_analytics_workspace" "test" {
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: │
TestExamplesDapr 2023-12-18T02:58:37Z command.go:185: ╵
Expected Behaviour
Pr #38 failed due to this error, but it's weird that the current main branch cannot reproduce this issue.
We've created a log analytics workspace at line 76, but we forgot to pass it's id to var.log_analytics_workspace, according to the toggle expression, the module would try to create another log analytics workspace with the same name, which should cause an error. It's weird that version d6c3196a2cf716e55aa6d297bc752dcb6a73ad9b met no error but the same issue blocked #38.
Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
1.6.3
Module Version
0.2.0
AzureRM Provider Version
3.85.0
Affected Resource(s)/Data Source(s)
azurerm_log_analytics_workspace
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
Pr #38 failed due to this error, but it's weird that the current
main
branch cannot reproduce this issue.We've created a log analytics workspace at line 76, but we forgot to pass it's id to
var.log_analytics_workspace
, according to the toggle expression, the module would try to create another log analytics workspace with the same name, which should cause an error. It's weird that version d6c3196a2cf716e55aa6d297bc752dcb6a73ad9b met no error but the same issue blocked #38.Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response