Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_site_recovery_replicated_vm: exported resource format mismatch #449

Open
ziyeqf opened this issue Sep 7, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@ziyeqf
Copy link
Collaborator

ziyeqf commented Sep 7, 2023

link: hashicorp/terraform-provider-azurerm#23159

managed_disk is exported in this format:

managed_disk = [{
 # details removed
}]

which caused azurerm failed on plan

it works with this format:

managed_disk {
 # details removed
}
@magodo magodo added the bug Something isn't working label Sep 8, 2023
@ljluestc
Copy link

resource "azurerm_virtual_machine" "example" {
name = "example-vm"
location = "East US"
resource_group_name = azurerm_resource_group.example.name
network_interface_ids = [azurerm_network_interface.example.id]
vm_size = "Standard_D2s_v3"

storage_os_disk {
name = "exampleosdisk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Premium_LRS"
}

os_profile {
computer_name = "hostname"
admin_username = "adminuser"

linux_config {
  disable_password_authentication = true
}

}

os_profile_linux_config {
disable_password_authentication = true

ssh_keys {
  path     = "/home/adminuser/.ssh/authorized_keys"
  key_data = file("~/.ssh/id_rsa.pub")
}

}

managed_disk {
storage_account_type = "Premium_LRS"
storage_container_name = "mycontainer"
source_uri = "https://mystorageaccount.blob.core.windows.net/mycontainer/mydisk.vhd"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants