pulumi-azure
pulumi-azure copied to clipboard
azure.operationalinsights.AnalyticsWorkspace error when dailyQuotaGb is not set
Version: @pulumi/azure v3.32.0
If dailyQuotaGb is not set, we got the following error :
error: azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace resource 'aw' has a problem: expected daily_quota_gb to be at least (0.000000), got -1.000000
Terraform supports it (but does not support to explictly set -1, so I opened an issue for that https://github.com/terraform-providers/terraform-provider-azurerm/issues/9732)
Code:
new azure.operationalinsights.AnalyticsWorkspace("aw", {
name: "log-aw-xyz",
resourceGroupName: "rg-aw",
retentionInDays: 30,
sku: "PerGB2018",
})
Terraform behaviour :
- when a value is set, it should be > 0
- when no value is set, it defaults to -1
A bit weird IMHO (it's why I open an issue)
Related to #783 This issue (#784) is the root cause, and #783 is the issue I had after trying to downgrade to a previous version
Just hit this as well. Looking in to it, should the terraform resource just not be specifying a default value of -1?
https://github.com/terraform-providers/terraform-provider-azurerm/blob/82b73af7a3319e3abb2bc1eb083be86941e9e9ab/azurerm/internal/services/loganalytics/log_analytics_workspace_resource.go#L99-L105
It seems silly to set a default value and then a validator function that says that value is invalid.
Totally agree! I opened an issue for that, cf my first comment, but they closed it