You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @pajcarpentier Thanks for raising the issue. I've been looking at this property and according to the Application Insights Workspace-Based Migration: The migration process is permanent, and cannot be reversed." Although the API doesn't throw an error, it doesn't change the workspace_id. As for updating it to null, you can do a Force Re-creation if the existing data in this resource doesn't matter: terraform apply -replace="azurerm_application_insights.my_application_insights".
And from the provider side, we'll improve the document to include this
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.
Hello,
using following terraform version and providers :
`tf_1.1 C:...\Infras\IsolatedWeb - 5.1>terraform -v
Terraform v1.1.6
on windows_amd64
having the following resource :
resource "azurerm_application_insights" "my_application_insights" { name = module.name.full_name location = var.location tags = var.tags resource_group_name = var.resource_group_name application_type = "web" }
The workspace_id as been set outside of terraform, so when terraform plan we have the following (but workspaci_id is not set as modified) :
`Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply":
module.my_app_insight["westeurope_00"].azurerm_application_insights.my_application_insights has changed
~ resource "azurerm_application_insights" "my_application_insights" {
+ force_customer_storage_for_profiler = false
id = "/subscriptions/bc046308-e9d7-4ad4-a8e6-de54fdb5d58f/resourceGroups/z-adf-csa-web-npd-ew1-rgp01/providers/Microsoft.Insights/components/z-adf-csa-web-npd-ew1-ain01"
name = "z-adf-csa-web-npd-ew1-ain01"
tags = {
"global-app" = "CSA"
"global-dataclass" = "Confidential"
"global-dcs" = "DIO"
"global-env" = "NPD"
"global-opco" = "ADF"
"global-project" = "DAFR"
"local-owner" = "[email protected]"
}
# (15 unchanged attributes hidden)
}
`
a terraform plan will figure this output :
`Terraform will perform the following actions:
module.my_app_insight["westeurope_00"].azurerm_application_insights.my_application_insights will be updated in-place
~ resource "azurerm_application_insights" "my_application_insights" {
id = "/subscriptions/bc046308-e9d7-4ad4-a8e6-de54fdb5d58f/resourceGroups/z-adf-csa-web-npd-ew1-rgp01/providers/Microsoft.Insights/components/z-adf-csa-web-npd-ew1-ain01"
name = "z-adf-csa-web-npd-ew1-ain01"
tags = {
"global-app" = "CSA"
"global-dataclass" = "Confidential"
"global-dcs" = "DIO"
"global-env" = "NPD"
"global-opco" = "ADF"
"global-project" = "DAFR"
"local-owner" = "[email protected]"
}
- workspace_id = "(workspace_id)" -> null
# (15 unchanged attributes hidden)
}
`
The workspace_id of the application insights want to be nullify, but no input for this workspace_id as been set.
looking at the azurerm_application_insight component at https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_insights
it appears that the workspace_id is optionnal, and not set by default to null.
could be fine that this value is not nullify if not set as input.
thank-you,
best regards,
Philippe
The text was updated successfully, but these errors were encountered: