Skip to content

azure: Drop storage02 vm and associated resources

Related to T3903

Test Plan

$ terraform apply
azurerm_resource_group.euwest-vault: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-vault]
azurerm_resource_group.euwest-cassandra: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra]
azurerm_storage_account.vault-storage: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-vault/providers/Microsoft.Storage/storageAccounts/swhvaultstorage]
azurerm_network_interface.vangogh-interface: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-vault/providers/Microsoft.Network/networkInterfaces/vangogh-interface]
azurerm_network_interface.storage-interface["storage02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface]
azurerm_network_interface.storage-interface["storage01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage01-interface]
azurerm_network_interface.cassandra-interface["cassandra04"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra04-interface]
azurerm_network_interface.cassandra-interface["cassandra01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra01-interface]
azurerm_network_interface.cassandra-interface["cassandra03"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra03-interface]
azurerm_network_interface.cassandra-interface["cassandra02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra02-interface]
azurerm_network_interface.cassandra-interface["cassandra06"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra06-interface]
azurerm_network_interface.cassandra-interface["cassandra05"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra05-interface]
azurerm_network_interface_security_group_association.vangogh-interface-sga: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-vault/providers/Microsoft.Network/networkInterfaces/vangogh-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_virtual_machine.vault-server: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-vault/providers/Microsoft.Compute/virtualMachines/vangogh]
azurerm_network_interface_security_group_association.storage-interface-sga["storage02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.storage-interface-sga["storage01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage01-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_virtual_machine.storage-server["storage01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Compute/virtualMachines/storage01]
azurerm_virtual_machine.storage-server["storage02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Compute/virtualMachines/storage02]
azurerm_virtual_machine.cassandra-server["cassandra03"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra03]
azurerm_virtual_machine.cassandra-server["cassandra05"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra05]
azurerm_virtual_machine.cassandra-server["cassandra06"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra06]
azurerm_virtual_machine.cassandra-server["cassandra01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra01]
azurerm_virtual_machine.cassandra-server["cassandra02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra02]
azurerm_virtual_machine.cassandra-server["cassandra04"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Compute/virtualMachines/cassandra04]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra02"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra02-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra03"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra03-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra04"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra04-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra05"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra05-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra06"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra06-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_network_interface_security_group_association.cassandra-interface-sga["cassandra01"]: Refreshing state... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-cassandra/providers/Microsoft.Network/networkInterfaces/cassandra01-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_storage_container.contents: Refreshing state... [id=https://swhvaultstorage.blob.core.windows.net/contents]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # azurerm_network_interface.storage-interface["storage02"] will be destroyed
  # (because key ["storage02"] is not in for_each map)
  - resource "azurerm_network_interface" "storage-interface" {
      - applied_dns_servers           = [] -> null
      - dns_servers                   = [] -> null
      - enable_accelerated_networking = false -> null
      - enable_ip_forwarding          = false -> null
      - id                            = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface" -> null
      - internal_domain_name_suffix   = "stfsycyoy3ye3bkm1m1bchwgsa.ax.internal.cloudapp.net" -> null
      - location                      = "westeurope" -> null
      - mac_address                   = "00-0D-3A-AA-8D-[D1](https://forge.softwareheritage.org/D1 'view original for D1 on Phabricator')" -> null
      - name                          = "storage02-interface" -> null
      - private_ip_address            = "192.168.200.44" -> null
      - private_ip_addresses          = [
          - "192.168.200.44",
        ] -> null
      - resource_group_name           = "euwest-servers" -> null
      - tags                          = {} -> null
      - virtual_machine_id            = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/EUWEST-SERVERS/providers/Microsoft.Compute/virtualMachines/storage02" -> null

      - ip_configuration {
          - name                          = "storageNicConfiguration" -> null
          - primary                       = true -> null
          - private_ip_address            = "192.168.200.44" -> null
          - private_ip_address_allocation = "Dynamic" -> null
          - private_ip_address_version    = "IPv4" -> null
          - subnet_id                     = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/virtualNetworks/swh-vnet/subnets/default" -> null
        }
    }

  # azurerm_network_interface_security_group_association.storage-interface-sga["storage02"] will be destroyed
  # (because key ["storage02"] is not in for_each map)
  - resource "azurerm_network_interface_security_group_association" "storage-interface-sga" {
      - id                        = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg" -> null
      - network_interface_id      = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface" -> null
      - network_security_group_id = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg" -> null
    }

  # azurerm_virtual_machine.storage-server["storage02"] will be destroyed
  # (because key ["storage02"] is not in for_each map)
  - resource "azurerm_virtual_machine" "storage-server" {
      - delete_data_disks_on_termination = false -> null
      - delete_os_disk_on_termination    = false -> null
      - id                               = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Compute/virtualMachines/storage02" -> null
      - location                         = "westeurope" -> null
      - name                             = "storage02" -> null
      - network_interface_ids            = [
          - "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface",
        ] -> null
      - resource_group_name              = "euwest-servers" -> null
      - tags                             = {
          - "environment" = "Storage"
        } -> null
      - vm_size                          = "Standard_D8s_v3" -> null
      - zones                            = [] -> null

      - boot_diagnostics {
          - enabled     = true -> null
          - storage_uri = "https://swhresourcediag966.blob.core.windows.net" -> null
        }

      - os_profile {
          - admin_username = "tmpadmin" -> null
          - computer_name  = "storage02" -> null
        }

      - os_profile_linux_config {
          - disable_password_authentication = true -> null

          - ssh_keys {
              - key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZarzgHrzUYspvrgSI6fszrALo92BDys7QOkJgUfZa9t9m4g7dUANNtwBiqIbqijAQPmB1zKgG6QTZC5rJkRy6KqXCW/+Qeedw/FWIbuI7jOD5WxnglbEQgvPkkB8kf1xIF7icRfWcQmK2je/3sFd9yS4/+jftNMPPXkBCxYm74onMenyllA1akA8FLyujLu6MNA1D8iLLXvz6pBDTT4GZ5/bm3vSE6Go8Xbuyu4SCtYZSHaHC2lXZ6Hhi6dbli4d3OwkUWz+YhFGaEra5Fx45Iig4UCL6kXPkvL/oSc9KGerpT//Xj9qz1K7p/IrBS8+eA4X69bHYYV0UZKDADZSn ardumont@yavin4" -> null
              - path     = "/home/tmpadmin/.ssh/authorized_keys" -> null
            }
          - ssh_keys {
              - key_data = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZ1TCpfzrvxLhEMhxjbxqPDCwY0nazIr1cyIbhGD2bUdAbZqVMdNtr7MeDnlLIKrIPJWuvltauvLNkYU0iLc1jMntdBCBM3hgXjmTyDtc8XvXseeBp5tDqccYNR/cnDUuweNcL5tfeu5kzaAg3DFi5Dsncs5hQK5KQ8CPKWcacPjEk4ir9gdFrtKG1rZmg/wi7YbfxrJYWzb171hdV13gSgyXdsG5UAFsNyxsKSztulcLKxvbmDgYbzytr38FK2udRk7WuqPbtEAW1zV4yrBXBSB/uw8EAMi+wwvLTwyUcEl4u0CTlhREljUx8LhYrsQUCrBcmoPAmlnLCD5Q9XrGH nicolasd@darboux id_rsa.inria.pub" -> null
              - path     = "/home/tmpadmin/.ssh/authorized_keys" -> null
            }
        }

      - storage_image_reference {
          - offer     = "debian-10" -> null
          - publisher = "debian" -> null
          - sku       = "10" -> null
          - version   = "latest" -> null
        }

      - storage_os_disk {
          - caching                   = "ReadWrite" -> null
          - create_option             = "FromImage" -> null
          - disk_size_gb              = 30 -> null
          - managed_disk_id           = "/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/EUWEST-SERVERS/providers/Microsoft.Compute/disks/storage02-osdisk" -> null
          - managed_disk_type         = "Premium_LRS" -> null
          - name                      = "storage02-osdisk" -> null
          - os_type                   = "Linux" -> null
          - write_accelerator_enabled = false -> null
        }
    }

Plan: 0 to add, 0 to change, 3 to destroy.

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_network_interface_security_group_association.storage-interface-sga["storage02"]: Destroying... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface|/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/swh-resource/providers/Microsoft.Network/networkSecurityGroups/worker-nsg]
azurerm_virtual_machine.storage-server["storage02"]: Destroying... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Compute/virtualMachines/storage02]
azurerm_network_interface_security_group_association.storage-interface-sga["storage02"]: Destruction complete after 5s
azurerm_virtual_machine.storage-server["storage02"]: Still destroying... [id=/subscriptions/49b7f681-8efc-4689-8524-...soft.Compute/virtualMachines/storage02, 10s elapsed]
azurerm_virtual_machine.storage-server["storage02"]: Destruction complete after 10s
azurerm_network_interface.storage-interface["storage02"]: Destroying... [id=/subscriptions/49b7f681-8efc-4689-8524-870fc0c1db09/resourceGroups/euwest-servers/providers/Microsoft.Network/networkInterfaces/storage02-interface]
azurerm_network_interface.storage-interface["storage02"]: Still destroying... [id=/subscriptions/49b7f681-8efc-4689-8524-.../networkInterfaces/storage02-interface, 10s elapsed]
azurerm_network_interface.storage-interface["storage02"]: Destruction complete after 10s

Apply complete! Resources: 0 added, 0 changed, 3 destroyed.

Migrated from D7203 (view on Phabricator)

Merge request reports

Loading