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:
Paul Meyer 2023-04-27 09:48:00 +02:00 committed by GitHub
parent 54df85447c
commit dd67a4295d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

View file

@ -89,9 +89,9 @@ func (c *destroyCmd) iamDestroy(cmd *cobra.Command, spinner spinnerInterf, destr
if !yes {
// 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 {
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)
if err != nil {

View file

@ -12,7 +12,11 @@ terraform {
}
provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
locals {

View file

@ -13,7 +13,11 @@ terraform {
# Configure Azure resource management provider
provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
# Configure Azure active directory provider

View file

@ -264,3 +264,8 @@ Delete the IAM configuration by executing the following command in the same dire
```bash
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.
:::