hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

azurerm_storage_sync_server_endpoint - Provider produced inconsistent result after apply #26014

Closed brentisaacs closed 1 week ago

brentisaacs commented 5 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.8.3

AzureRM Provider Version

3.104.0

Affected Resource(s)/Data Source(s)

azurerm_storage_sync_server_endpoint

Terraform Configuration Files

resource "azurerm_storage_sync_server_endpoint" "sync-server-endpoint" {
  count                      = 1
  name                       = "my-ssse"
  storage_sync_group_id      = "/subscriptions/.../resourceGroups/my-main-rg/providers/microsoft.storagesync/storageSyncServices/my-storagesync-svc/syncGroups/my-ssg"
  registered_server_id       = "/subscriptions/.../resourceGroups/my-main-rg/providers/Microsoft.StorageSync/storageSyncServices/my-storagesync-svc/registeredServers/..."
  server_local_path          = "D:\mypath"
  cloud_tiering_enabled      = true
}

Debug Output/Panic Output

Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.my_az_filesync["myfileshare"].azurerm_storage_sync_server_endpoint.sync-server-endpoint[0],
│ provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced
│ an unexpected new value: Root object was present, but now absent.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
##[error]Terraform command 'apply' failed with exit code '1'.

Expected Behaviour

Successful terraform provisioning and state file update

Actual Behaviour

Terraform applied the changes, but showed as a failure and did not update the state file

Steps to Reproduce

  1. terraform apply

Important Factoids

No response

References

No response

bruceharrison1984 commented 5 months ago

I believe this was fixed by this PR: https://github.com/hashicorp/terraform-provider-azurerm/pull/26204

It should be available in the next release.

rcskosir commented 1 week ago

Thanks for taking the time to submit this issue. It looks like this has been resolved as of #26204. As such, I am going to mark this issue as closed. If that is not the case, please provide additional information including the version in which you are still experiencing this issue, thanks!