Closed jrsherry closed 11 months ago
Closed the issue. The documentation is correct in that the variable is optional when the cluster_log_analytics_workspace_name is set. Unfortunately I had log_analytics_workspace_enabled set to false and didn't realize that I still needed to pass a workspace name to avoid the prefix error.
Seems to me like this still doesn't make much sense to "require" a name for a log analytics workspace when you disable creation.
Either the logic to disable the variable should be fixed or the documentation should provide this information since the error you get doesn't help much.
Seems to me like this still doesn't make much sense to "require" a name for a log analytics workspace when you disable creation.
Either the logic to disable the variable should be fixed or the documentation should provide this information since the error you get doesn't help much.
It is not about the log analytics.
It is used here: https://github.com/Azure/terraform-azurerm-aks/blob/4729aee8c064da747186a14d6c3575c67e673692/main.tf#L24
Yes I've found the reason for it :)
However the description of the variable doesn't match with the behavior as that states the following:
"(Optional) The prefix for the resources created in the specified Azure Resource Group. Omitting this variable requires both `var.cluster_log_analytics_workspace_name` and `var.cluster_name` have been set."
And the fact that it's optional without a mention of dns_prefix
using it is what confused me at first. The field dns_prefix
isn't a requirement according to the documentation but it's not intuitive this way, at least not for me.
Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
1.5.7
Module Version
7.5.0
AzureRM Provider Version
latest
Affected Resource(s)/Data Source(s)
azurerm_3.76.0
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
Per the README, and variables.tf, prefix is optional. However, if left unset, application of this module fails due to empty string being an invalid dns_prefix.
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response