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.

168 lines
5.5KB

  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 this 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 whether 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 be 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 whether 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 "logs" {
  104. description = <<-DOCUMENTATION
  105. A list of list of map of options to apply. Map must support the following structure:
  106. * 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.
  107. * enabled(Optional, boolean): Is this Diagnostic metric enabled?
  108. * retention_policy(Optional, list of map): A list of map of retention policies to apply
  109. * enabled(required, boolean): Is this retention policy enabled?
  110. * 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.
  111. For example, see folder example/default folder.
  112. DOCUMENTATION
  113. type = list
  114. default = []
  115. }
  116. variable "metrics" {
  117. description = <<-DOCUMENTATION
  118. A list of list of map of options to apply. Map must support the following structure:
  119. * 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.
  120. * enabled(Optional, boolean): Is this Diagnostic metric enabled?
  121. * retention_policy(Optional, list of map): A list of map of retention policies to apply
  122. * enabled(required, boolean): Is this retention policy enabled?
  123. * 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.
  124. For example, see folder example/default folder.
  125. DOCUMENTATION
  126. type = list
  127. default = [
  128. [
  129. {
  130. category = "AllMetrics"
  131. enabled = true
  132. retention_policy = [
  133. {
  134. enabled = false
  135. days = 2
  136. }
  137. ]
  138. }
  139. ]
  140. ]
  141. }