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

The total_retention_in_days value isn't being set when using basic tables in azurerm_log_analytics_workspace_table #27358

Closed
1 task done
richard-sistern opened this issue Sep 11, 2024 · 2 comments · Fixed by #27420

Comments

@richard-sistern
Copy link

richard-sistern commented Sep 11, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.8.1

AzureRM Provider Version

4.1.0

Affected Resource(s)/Data Source(s)

azurerm_log_analytics_workspace_table

Terraform Configuration Files

law_audit_basic_tables = [
    "AKSAuditAdmin",
    "ApiManagementGatewayLogs",
    "CDBControlPlaneRequests",
    "CDBDataPlaneRequests",
    "StorageBlobLogs",
  ]

resource "azurerm_log_analytics_workspace_table" "basic_table" {
  for_each = toset(local.law_audit_basic_tables)

  workspace_id = azurerm_log_analytics_workspace.loganalytics.id
  name         = each.key

  plan                    = "Basic"
  total_retention_in_days = 180
}

Debug Output/Panic Output

No warnings/errors during plan/apply

Expected Behaviour

The total retention in days set to 180 for tables in local.law_audit_basic_tables

Actual Behaviour

A plan/apply completes fine, however the total retention remained at the default 30 days. After manually updating the values to 180 days in portal, like this:

image

A subsequent plan gives the following change for each table: ~ total_retention_in_days = 0 -> 180. This happens on every plan.

Steps to Reproduce

terraform plan/apply

Important Factoids

No response

References

No response

@rcskosir rcskosir added the bug label Sep 11, 2024
ziyeqf added a commit to ziyeqf/terraform-provider-azurerm that referenced this issue Sep 18, 2024
ziyeqf added a commit to ziyeqf/terraform-provider-azurerm that referenced this issue Sep 18, 2024
ziyeqf added a commit to ziyeqf/terraform-provider-azurerm that referenced this issue Sep 18, 2024
@ziyeqf
Copy link
Contributor

ziyeqf commented Sep 18, 2024

Hi @richard-sistern, thanks for reporting.

The current implementation ignored total_retention_in_days when plan is set to Basic. I just submitted a PR (#27420) to fix it. Once it merged & released it should be fixed. You can subscribe the PR to keep a track.

For any further questions please leave comments.
Thanks!

@github-actions github-actions bot added this to the v4.3.0 milestone Sep 19, 2024
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 Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants