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
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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.
Terraform Version
1.9.8
AzureRM Provider Version
3.0.0
Affected Resource(s)/Data Source(s)
azurerm_managed_disk
Terraform Configuration Files
terraform {
required_providers {
azurerm={
source ="hashicorp/azurerm"
version ="=3.0.0"
}
}
}
provider"azurerm" {
features {}
}
variable"prefix" {
default="tfvmex"
}
data"azurerm_managed_disk""os-restore" {
name="restorevm-datadisk-000-20241212-082533"resource_group_name="tfvmex-resources"
}
resource"azurerm_resource_group""rg" {
name="${var.prefix}-resources"location="West Europe"
}
resource"azurerm_virtual_network""main" {
name="${var.prefix}-network"address_space=["10.70.0.0/20"]
location=azurerm_resource_group.rg.locationresource_group_name=azurerm_resource_group.rg.name
}
resource"azurerm_subnet""internal" {
name="internal"resource_group_name=azurerm_resource_group.rg.namevirtual_network_name=azurerm_virtual_network.main.nameaddress_prefixes=["10.70.0.0/24"]
}
resource"azurerm_network_interface""main" {
name="${var.prefix}-nic"location=azurerm_resource_group.rg.locationresource_group_name=azurerm_resource_group.rg.nameip_configuration {
name="testconfiguration1"subnet_id=azurerm_subnet.internal.idprivate_ip_address_allocation="Dynamic"
}
}
resource"azurerm_virtual_machine""main" {
name="${var.prefix}-vm"location=azurerm_resource_group.rg.locationresource_group_name=azurerm_resource_group.rg.namenetwork_interface_ids=[azurerm_network_interface.main.id]
vm_size="Standard_DS1_v2"# Uncomment this line to delete the OS disk automatically when deleting the VMdelete_os_disk_on_termination=true# Uncomment this line to delete the data disks automatically when deleting the VMdelete_data_disks_on_termination=truestorage_os_disk {
name="myosdisk1"caching="ReadWrite"create_option="Attach"managed_disk_id=azurerm_managed_disk.os-copy.id
}
tags={
environment ="staging"
}
depends_on=[ azurerm_managed_disk.os-copy ]
}
resource"azurerm_managed_disk""os-copy" {
name="os-copy"location=azurerm_resource_group.rg.locationresource_group_name=azurerm_resource_group.rg.namestorage_account_type="Standard_LRS"create_option="Copy"source_resource_id=data.azurerm_managed_disk.os-restore.iddisk_size_gb="1024"tags={
environment ="staging"
}
depends_on=[ data.azurerm_managed_disk.os-restore ]
}
Debug Output/Panic Output
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
azurerm_managed_disk.os-copy: Creating...
╷
│ Error: creating/updating Managed Disk "os-copy" (Resource Group "tfvmex-resources"): compute.DisksClient#CreateOrUpdate: Failure sending request: StatusCode=404 -- Original Error: Code="NotFound" Message="Resource restorevm-datadisk-000-20241212-082533 is not found."
│
│ with azurerm_managed_disk.os-copy,
│ on main.tf line 81, in resource "azurerm_managed_disk""os-copy":
│ 81: resource "azurerm_managed_disk""os-copy" {
│
╵
Expected Behaviour
The new managed disk should be created based on the restore disk
Actual Behaviour
Impossible to create the new managed disk
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue. You have listed 3.0.0 as the version of the provider that you're using.
Are you able to try this in a newer version of the provider and see if the described behavior is still occurring? We are at version 4.13.0 as of writing this comment.
Is there an existing issue for this?
Community Note
Terraform Version
1.9.8
AzureRM Provider Version
3.0.0
Affected Resource(s)/Data Source(s)
azurerm_managed_disk
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The new managed disk should be created based on the restore disk
Actual Behaviour
Impossible to create the new managed disk
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: