diff --git a/cli/epicli.py b/cli/epicli.py index 42192131f6..6f084276f1 100644 --- a/cli/epicli.py +++ b/cli/epicli.py @@ -233,7 +233,9 @@ def delete_parser(subparsers): sub_parser._action_groups.append(optional) def run_delete(args): - if not query_yes_no('Do you really want to delete your cluster?'): + if not query_yes_no('You are trying to delete your cluster. ' + 'If your configuration does not allow to keep the existing disks used in the cluster, you will lose your data. ' + 'Make sure your data is safe. Do you really want to delete your cluster?'): return 0 adjust_paths_from_build(args) with DeleteEngine(args) as engine: diff --git a/docs/changelogs/CHANGELOG-1.3.md b/docs/changelogs/CHANGELOG-1.3.md index 6e4d12d410..46a64ac038 100644 --- a/docs/changelogs/CHANGELOG-1.3.md +++ b/docs/changelogs/CHANGELOG-1.3.md @@ -1,5 +1,11 @@ # Changelog 1.3 +## [1.3.1] 2022-04-15 ??? + +### Fixed + +- [#3065](https://github.com/epiphany-platform/epiphany/issues/3065) - Flag `delete_os_disk_on_termination` has no effect when removing cluster + ## [1.3.0] 2022-01-19 ### Added diff --git a/docs/home/howto/CLUSTER.md b/docs/home/howto/CLUSTER.md index b5e3c9fecb..b22e3d053b 100644 --- a/docs/home/howto/CLUSTER.md +++ b/docs/home/howto/CLUSTER.md @@ -588,6 +588,11 @@ Epicli has a delete command to remove a cluster from a cloud provider (AWS, Azur From the defined cluster build folder it will take the information needed to remove the resources from the cloud provider. +### Note for Azure cloud provider + +Make sure you can safely remove OS and data disks - Epiphany does not support cluster removal from Azure +while preserving existing disks. + ## Single machine cluster *Please read first prerequisites related to [hostname requirements](./PREREQUISITES.md#hostname-requirements).* diff --git a/schema/azure/defaults/infrastructure/virtual-machine.yml b/schema/azure/defaults/infrastructure/virtual-machine.yml index 3c265d5c88..222e05fe3c 100644 --- a/schema/azure/defaults/infrastructure/virtual-machine.yml +++ b/schema/azure/defaults/infrastructure/virtual-machine.yml @@ -20,7 +20,6 @@ specification: sku: 20_04-lts-gen2 version: "20.04.202201100" # Never put latest on anything! Need to always pin the version number but testing we can get away with it storage_os_disk: - delete_on_termination: false managed: false caching: ReadWrite create_option: FromImage diff --git a/schema/azure/validation/infrastructure/virtual-machine.yml b/schema/azure/validation/infrastructure/virtual-machine.yml index 9148aefb0e..c160a8da53 100644 --- a/schema/azure/validation/infrastructure/virtual-machine.yml +++ b/schema/azure/validation/infrastructure/virtual-machine.yml @@ -41,8 +41,6 @@ properties: storage_os_disk: type: object properties: - delete_on_termination: - type: boolean managed: type: boolean caching: diff --git a/terraform/azure/infrastructure/virtual-machine.j2 b/terraform/azure/infrastructure/virtual-machine.j2 index 2e81de148d..bd38fd338e 100644 --- a/terraform/azure/infrastructure/virtual-machine.j2 +++ b/terraform/azure/infrastructure/virtual-machine.j2 @@ -49,10 +49,6 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" { # windows specific stuff here maybe... hopefully never. {%- endif %} - {%- if specification.storage_os_disk.managed != true %} - delete_os_disk_on_termination = "{{ specification.storage_os_disk.delete_on_termination | lower }}" - {%- endif %} - storage_os_disk { name = "{{ specification.name }}-os-disk" caching = "{{ specification.storage_os_disk.caching }}"