You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
5.9KB

  1. ###
  2. # General
  3. ###
  4. variable "enabled" {
  5. description = "Enable or disable module."
  6. default = true
  7. }
  8. variable "resource_group_location" {
  9. description = "Location where the resources will be deployed.Changing this forces a new resource to be created."
  10. default = "canadacentral"
  11. }
  12. variable "resource_group_name" {
  13. description = "Name of the resource group where the resource will be deployed.Changing this forces a new resource to be created."
  14. default = ""
  15. }
  16. variable "tags" {
  17. description = "Tags shared by all resource of tis module. Will be merged with any other specific tags by resource."
  18. default = {}
  19. }
  20. ###
  21. # Storage account
  22. ###
  23. variable "storage_account_exist" {
  24. description = "Boolean flag which describes whhether the storage account is already existing or not."
  25. default = false
  26. }
  27. variable "storage_account_name" {
  28. description = "Name of the storage account to be used to host the logs. Changing forces a new resource to be created."
  29. type = string
  30. default = ""
  31. }
  32. variable "account_tier" {
  33. description = "Type of the tier to use for the storage account.Changing this force a new resource to be created."
  34. type = string
  35. default = "Standard"
  36. }
  37. variable "account_replication_type" {
  38. description = "The type of replication to use for this storage account. Valid options are 'LRS','GRS','RAGRS' and 'ZRS'."
  39. type = string
  40. default = "LRS"
  41. }
  42. variable "enable_https_traffic_only" {
  43. description = "Boolean flag which forces HTTPS if enabled."
  44. default = true
  45. }
  46. variable "storage_containers" {
  47. description = "List of containers to create and their access levels."
  48. default = []
  49. type = list(object({ name = string, access_type = string }))
  50. }
  51. variable "storage_shares" {
  52. description = "List of share to create"
  53. default = []
  54. type = list(object({ name = string, quota = string }))
  55. }
  56. variable "storage_account_tags" {
  57. description = "Tags which will specifically assigned to the storage account."
  58. default = {}
  59. }
  60. ###
  61. # Log analytics workspace
  62. ###
  63. variable "workspace_exist" {
  64. description = "Boolean flag which describes whhether the log analytics workspace is already existing or not."
  65. default = false
  66. }
  67. variable "log_analytics_workspace_name" {
  68. description = "Name of the workspace to deploy to be used for logging.Changing this forces a new resource to be created."
  69. type = string
  70. default = ""
  71. }
  72. variable "workspace_sku" {
  73. description = "SKU of the workspace to deploy to be used for logging.Changing this forces a new resource to be created."
  74. type = string
  75. default = "free"
  76. }
  77. variable "retention_in_days" {
  78. description = "Number of days that logs will be retained in the workspace."
  79. type = number
  80. default = 7
  81. }
  82. variable "log_analytics_workspace_tags" {
  83. description = "Tags which will be associated to the log analytics workspace."
  84. default = {}
  85. }
  86. ###
  87. # Diagnostics settings
  88. ###
  89. variable "diagnostics_count" {
  90. description = "How many diagnostics settings to create."
  91. default = 1
  92. }
  93. variable "names" {
  94. description = "List which specifies the names of the diagnostics settings. Changing this forces a new resource to be created."
  95. type = list(string)
  96. default = [""]
  97. }
  98. variable "target_resource_ids" {
  99. description = "The list of IDs of an existing resource on which to configure diagnostic settings. Changing this forces a new resource to be created."
  100. type = list(string)
  101. default = [""]
  102. }
  103. variable "log_analytics_destination_type" {
  104. description = "when set to `Dedicated logs sent to a log analytics workspace will go into resource specific tables, instead of the legacy Azurediagnostics table. Note: This setting will only have an effect if a `log_analytics_workspace_id` is provided, and the resource is avaliable for resource-specific logs."
  105. type = list(string)
  106. default = [""]
  107. }
  108. variable "logs" {
  109. description = <<-DOCUMENTATION
  110. A list of list of map of options to apply. Map must support the following structure:
  111. * category(required, string): The name of a diagnostic log category for the resource. Note: The log categories available vary depending on the resource begin used. You may wish to use `azurerm_monitor_diagnostc_catehories` data source to identify which categories are available for a given resource.
  112. * enabled(Optional, boolean): Is this Diagnostic metric enabled?
  113. * retention_policy(Optional, list of map): A list of map of retention policies to apply
  114. * enabled(required, boolean): Is this retention policy enabled?
  115. * days(Optional, number): The number of days for which this retention policy should be applied. Note: Setting this to 0 will retain the events indefinetly.
  116. For example, see folder example/default folder.
  117. DOCUMENTATION
  118. type = list
  119. default = [[]]
  120. }
  121. variable "metrics" {
  122. description = <<-DOCUMENTATION
  123. A list of list of map of options to apply. Map must support the following structure:
  124. * category(required, string): The name of a diagnostic log category for the resource. Note: The metric categories available vary depending on the resource begin used. You may wish to use `azurerm_monitor_diagnostc_catehories` data source to identify which categories are available for a given resource.
  125. * enabled(Optional, boolean): Is this Diagnostic metric enabled?
  126. * retention_policy(Optional, list of map): A list of map of retention policies to apply
  127. * enabled(required, boolean): Is this retention policy enabled?
  128. * days(Optional, number): The number of days for which this retention policy should be applied. Note: Setting this to 0 will retain the events indefinetly.
  129. For example, see folder example/default folder.
  130. DOCUMENTATION
  131. type = list
  132. default = [[
  133. {
  134. category = "AllMetrics"
  135. enabled = true
  136. retention_policy = [
  137. {
  138. enabled = false
  139. days = 2
  140. }
  141. ]
  142. }
  143. ]]
  144. }