Skip to content

Commit

Permalink
SSL mode value set based in use_azure flag
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkataChalla554 committed Jul 1, 2024
1 parent 83e8d1a commit b91199b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aks/postgres/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ output "name" {
}

output "url" {
value = "postgres://${urlencode(local.database_username)}:${urlencode(local.database_password)}@${local.host}:${local.port}/${local.database_name}"
value = "postgres://${urlencode(local.database_username)}:${urlencode(local.database_password)}@${local.host}:${local.port}/${local.database_name}?sslmode=${var.use_azure ? "require" : "prefer"}"
sensitive = true
}

output "dotnet_connection_string" {
value = "Server=${local.host};Database=${local.database_name};Port=${local.port};User Id=${local.database_username};Password='${local.database_password}';Ssl Mode=Require;Trust Server Certificate=true"
value = "Server=${local.host};Database=${local.database_name};Port=${local.port};User Id=${local.database_username};Password='${local.database_password}';Ssl Mode=${var.use_azure ? "Require" : "Prefer"};Trust Server Certificate=true"
sensitive = true
}


output "azure_backup_storage_account_name" {
value = local.azure_enable_backup_storage ? azurerm_storage_account.backup[0].name : null
}
Expand Down

0 comments on commit b91199b

Please sign in to comment.