cli: force-delete Azure resource group (#1667)

* force-delete Azure resource group

* were not -> weren't

* fix typo
This commit is contained in:
Moritz Sanft 2023-04-19 08:30:11 +02:00 committed by GitHub
parent 5145f806ea
commit 3031d395a9
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 !flags.yes { if !flags.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 {

View File

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

View File

@ -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

View File

@ -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.
:::