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_cluster - update the validation for size_gb #17780

Merged
merged 4 commits into from
Aug 2, 2022
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 @@ -53,17 +53,11 @@ func resourceLogAnalyticsCluster() *pluginsdk.Resource {

"identity": commonschema.SystemAssignedIdentityRequiredForceNew(),

// Per the documentation cluster capacity must start at 500 GB and can go above 3000 GB with an exception by Microsoft
// so I am not limiting the upperbound here by design
// https://docs.microsoft.com/en-us/azure/azure-monitor/logs/logs-dedicated-clusters
"size_gb": {
Type: pluginsdk.TypeInt,
Optional: true,
Default: 1000,
ValidateFunc: validation.All(
validation.IntAtLeast(500),
validation.IntDivisibleBy(100),
),
Type: pluginsdk.TypeInt,
Optional: true,
Default: 1000,
ValidateFunc: validation.IntInSlice([]int{500, 1000, 2000, 5000}),
},

"cluster_id": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ resource "azurerm_log_analytics_cluster" "test" {
name = "acctest-LA-%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
size_gb = 1100
size_gb = 1000

identity {
type = "SystemAssigned"
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/log_analytics_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ The following arguments are supported:

* `identity` - (Required) An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.

* `size_gb` - (Optional) The capacity of the Log Analytics Cluster specified in GB/day. Defaults to 500.
* `size_gb` - (Optional) The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `500`, `1000`, `2000` or `5000`. Defaults to `1000`.

~> **NOTE:** The `size_gb` can be in the range of 500 to 3000 GB per day and must be in steps of 100 GB. For `size_gb` levels higher than 3000 GB per day, please contact your Microsoft contact to enable it.
~> **NOTE:** The cluster capacity must start at 500 GB and can be set to 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).

* `tags` - (Optional) A mapping of tags which should be assigned to the Log Analytics Cluster.

Expand Down