Skip to content

Commit

Permalink
Merge pull request #70 from Ontotext-AD/GDB-10224_fix_deployment_vaul…
Browse files Browse the repository at this point in the history
…t_diagnostic_settings

GDB-10224 Fixed the deployment of key vault diagnostic settings when monitoring is enabled
  • Loading branch information
viktor-ribchev authored May 9, 2024
2 parents ab23978 + 4b62165 commit 3b43a74
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Added check for total quorum availability before node joining the cluster.
* Removed useless if check before waiting for the raft folder existence.

* Fixed the deployment of `azurerm_monitor_diagnostic_setting` for the key vault when monitoring is enabled

## 1.0.1

Updated GraphDB version to [10.6.3](https://graphdb.ontotext.com/documentation/10.6/release-notes.html#graphdb-10-6-3)
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ module "monitoring" {
ag_notifications_email_list = var.notification_recipients_email_list

# Diagnostic settings
app_configuration_id = module.appconfig.app_configuration_id
key_vault_id = var.tls_certificate_id != null ? null : module.vault[0].key_vault_id
app_configuration_id = module.appconfig.app_configuration_id
key_vault_id = var.tls_certificate_id != null ? null : module.vault[0].key_vault_id
create_key_vault_diagnostic_settings = var.tls_certificate_id == null ? true : false
}

# Creates a VM scale set for GraphDB and GraphDB cluster proxies
Expand Down
2 changes: 1 addition & 1 deletion modules/monitoring/diagnostic_settings.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "azurerm_monitor_diagnostic_setting" "application_config_diagnostic_set
# Key Vault Audit log monitoring

resource "azurerm_monitor_diagnostic_setting" "key_vault_diagnostic_settings" {
count = var.key_vault_id != null ? 1 : 0
count = var.create_key_vault_diagnostic_settings ? 1 : 0

name = "Key Vault diagnostic settings"
target_resource_id = var.key_vault_id
Expand Down
5 changes: 5 additions & 0 deletions modules/monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@ variable "key_vault_id" {
description = "ID of the Key Vault resource, required for diagnostic settings"
type = string
}

variable "create_key_vault_diagnostic_settings" {
description = "Boolean variable to determine whether to create Key Vault diagnostic settings."
type = bool
}

0 comments on commit 3b43a74

Please sign in to comment.