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
When using a moved() block to update a diagnostic setting between AzureRM and AzAPI, the provider wants to create the resource rather than update-in-place.
moved {
from=azurerm_monitor_diagnostic_setting.thisto=azapi_resource.diagnostic_setting
}
This results in the following:
# module.vnet1.azapi_resource.diagnostic_setting["sendToLogAnalytics"] will be created
# (moved from module.vnet1.azurerm_monitor_diagnostic_setting.this["sendToLogAnalytics"])
+ resource "azapi_resource" "diagnostic_setting" {
When this runs, we get the expected issue because the resource already exists:
Error: Resource already exists
│
│ with module.vnet1.azapi_resource.diagnostic_setting["sendToLogAnalytics"],
│ on ../../main.interfaces.tf line 66, in resource "azapi_resource" "diagnostic_setting":
│ 66: resource "azapi_resource" "diagnostic_setting" {
Is this a bug, or have I got something wrong?
The text was updated successfully, but these errors were encountered:
When using a moved() block to update a diagnostic setting between AzureRM and AzAPI, the provider wants to create the resource rather than update-in-place.
Here's an example from my vnet module fork:
https://github.com/kewalaka/terraform-azurerm-avm-res-network-virtualnetwork/blob/48ec566ea0305269fabd025ccfcefa9b193dc772/main.interfaces.tf#L130-L133
This results in the following:
When this runs, we get the expected issue because the resource already exists:
Is this a bug, or have I got something wrong?
The text was updated successfully, but these errors were encountered: