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

azurerm_log_analytics_workspace_table - support more values for total_retention_in_days and retention_in_days #27053

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/utils"
)

type LogAnalyticsWorkspaceTableResource struct {
}
type LogAnalyticsWorkspaceTableResource struct{}

var _ sdk.ResourceWithUpdate = LogAnalyticsWorkspaceTableResource{}
var _ sdk.ResourceWithCustomizeDiff = LogAnalyticsWorkspaceTableResource{}
var (
_ sdk.ResourceWithUpdate = LogAnalyticsWorkspaceTableResource{}
_ sdk.ResourceWithCustomizeDiff = LogAnalyticsWorkspaceTableResource{}
)

type LogAnalyticsWorkspaceTableResourceModel struct {
Name string `tfschema:"name"`
Expand Down Expand Up @@ -76,13 +77,13 @@ func (r LogAnalyticsWorkspaceTableResource) Arguments() map[string]*pluginsdk.Sc
"retention_in_days": {
Type: pluginsdk.TypeInt,
Optional: true,
ValidateFunc: validation.Any(validation.IntBetween(30, 730), validation.IntInSlice([]int{7})),
ValidateFunc: validation.IntBetween(4, 730),
},

"total_retention_in_days": {
Type: pluginsdk.TypeInt,
Optional: true,
ValidateFunc: validation.Any(validation.IntBetween(30, 4383), validation.IntInSlice([]int{7})),
ValidateFunc: validation.Any(validation.IntBetween(4, 730), validation.IntInSlice([]int{1095, 1460, 1826, 2191, 2556, 2922, 3288, 3653, 4018, 4383})),
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/log_analytics_workspace_table.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ The following arguments are supported:

-> **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1#supported-tables).

* `retention_in_days` - (Optional) The table's retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730.
* `retention_in_days` - (Optional) The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.

* `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between 30 and 4383.
* `total_retention_in_days` - (Optional) The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.

-> **Note:** `retention_in_days` and `total_retention_in_days` will revert back to the value of azurerm_log_analytics_workspace retention_in_days when a azurerm_log_analytics_workspace_table is deleted.

Expand Down
Loading