mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-06 14:04:17 -04:00
cli: force-delete Azure resource group (#1667)
* force-delete Azure resource group * were not -> weren't * fix typo Co-authored-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
This commit is contained in:
parent
54df85447c
commit
dd67a4295d
4 changed files with 17 additions and 4 deletions
|
@ -89,9 +89,9 @@ func (c *destroyCmd) iamDestroy(cmd *cobra.Command, spinner spinnerInterf, destr
|
||||||
|
|
||||||
if !yes {
|
if !yes {
|
||||||
// Confirmation
|
// Confirmation
|
||||||
confirmString := "Do you really want to destroy your IAM configuration?"
|
confirmString := "Do you really want to destroy your IAM configuration? Note that this will remove all resources in the resource group."
|
||||||
if gcpFileExists {
|
if gcpFileExists {
|
||||||
confirmString += fmt.Sprintf(" (This will also delete %q)", constants.GCPServiceAccountKeyFile)
|
confirmString += fmt.Sprintf("\nThis will also delete %q", constants.GCPServiceAccountKeyFile)
|
||||||
}
|
}
|
||||||
ok, err := askToConfirm(cmd, confirmString)
|
ok, err := askToConfirm(cmd, confirmString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -12,7 +12,11 @@ terraform {
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "azurerm" {
|
provider "azurerm" {
|
||||||
features {}
|
features {
|
||||||
|
resource_group {
|
||||||
|
prevent_deletion_if_contains_resources = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
|
|
|
@ -13,7 +13,11 @@ terraform {
|
||||||
|
|
||||||
# Configure Azure resource management provider
|
# Configure Azure resource management provider
|
||||||
provider "azurerm" {
|
provider "azurerm" {
|
||||||
features {}
|
features {
|
||||||
|
resource_group {
|
||||||
|
prevent_deletion_if_contains_resources = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure Azure active directory provider
|
# Configure Azure active directory provider
|
||||||
|
|
|
@ -264,3 +264,8 @@ Delete the IAM configuration by executing the following command in the same dire
|
||||||
```bash
|
```bash
|
||||||
constellation iam destroy
|
constellation iam destroy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
For Azure, deleting the IAM configuration by executing `constellation iam destroy` will delete the whole resource group created by `constellation iam create`.
|
||||||
|
This also includes any additional resources in the resource group that weren't created by Constellation.
|
||||||
|
:::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue