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 for Retention by data type on azurerm_log_analytics_workspace #6199

Closed
ricohomewood opened this issue Mar 20, 2020 · 9 comments · Fixed by #24229
Closed

Support for Retention by data type on azurerm_log_analytics_workspace #6199

ricohomewood opened this issue Mar 20, 2020 · 9 comments · Fixed by #24229

Comments

@ricohomewood
Copy link

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

Description

Allow to set retention by data type on log analytics workspace.

New or Affected Resource(s)

  • azurerm_log_analytics_workspace

Potential Terraform Configuration

resource "azurerm_log_analytics_workspace" "test" {
  name                = "workspacetest-01"
  location            = azurerm_resource_group.test.location
  resource_group_name = azurerm_resource_group.test.name
  sku                 = "PerGB2018"
  retention_in_days   = 30
  data_type_retention = {
    name = "ContainerLog"
    retention_in_days = 60
  }
}

References

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/manage-cost-storage#change-the-data-retention-period

Example API call ...

PUT /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/MyResourceGroupName/providers/Microsoft.OperationalInsights/workspaces/MyWorkspaceName/Tables/SecurityEvent?api-version=2017-04-26-preview
    {
        "properties": 
        {
            "retentionInDays": 730
        }
    }
@C123R
Copy link

C123R commented May 16, 2021

Hi there, Can I give it a shot?

@favoretti
Copy link
Collaborator

@C123R by all means, thank you!

@christianrondeau
Copy link

@C123R did you begin an implementation? I didn't find a branch in your GitHub profile.

@C123R
Copy link

C123R commented Sep 30, 2021

Hi @christianrondeau, Not yet - I'm still waiting for the go from contributors. Just wanted to make sure it wasn't already in the works?

@favoretti
Copy link
Collaborator

Not that I'm aware of. Feel free to submit a PR!

@markrzasa
Copy link
Contributor

Is anyone working on this? If not, I have some code that I could contribute to hopefully close this issue. I'd just need a week or two to get the code ready for a PR.
Thanks.

@christianrondeau
Copy link

@stephybun I saw on the related PR that this was on hold until the new Azure SDK was available, and the PR itself was abandoned; I guess this also means this resource will be revisited? I'm not sure I can contribute but more information on this issue's dependencies status would be nice :) Thanks!

@markrzasa
Copy link
Contributor

markrzasa commented Aug 22, 2022

@stephybun If the SDK is ready, I can rework and resubmit my PR.

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 Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants