Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support permanent deletion of workspaces with the permanently_delete_on_destroy feature flag (#10235) #11052

Closed
stevensoave opened this issue Mar 19, 2021 · 2 comments

Comments

@stevensoave
Copy link

stevensoave commented Mar 19, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform Version = 0.13.5
AzureRM Provider Version = 2.50.0 (March 05, 2021) - Also tested 2.52.0

Affected Resource(s)

  • azurerm_log_analytics_workspace

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behaviour

https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/internal/services/loganalytics/log_analytics_workspace_resource.go

Missing attribute scheme on top section of the file for "permanently_delete_on_destroy"

This is supported from the below function in that go file:
func resourceLogAnalyticsWorkspaceDelete

Not able to use in TF:

Steps to Reproduce

resource "azurerm_log_analytics_workspace" "la_workspace" {
  name                    = format(
                            "la-%s-%s-%s",
                            var.naming_convention["prj"],
                            var.naming_convention["reg"],
                            var.naming_convention["env"],
                          )
  location                = lookup(var.log_analytics, "workspace_location", var.location)
  resource_group_name     = var.resource_group_name
  sku                     = lookup(var.log_analytics, "sku", "PerNode")
  retention_in_days       = var.retention
  tags                    = var.tags
  permanently_delete_on_destroy = false

Error: Unsupported argument

on .terraform/modules/log_analytics/main.tf line 13, in resource "azurerm_log_analytics_workspace" "la_workspace":
13: permanent_delete = false

An argument named "permanent_delete" is not expected here.

  1. terraform apply

Important Factoids

References

@tombuildsstuff
Copy link
Contributor

This feature's controlable via the features block within the provider block: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#permanently_delete_on_destroy

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants