Skip to content

Commit

Permalink
update defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Telemaco019 committed Aug 7, 2024
1 parent 808fbe5 commit 53e2597
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Available on [Terraform Registry](https://registry.terraform.io/modules/nebuly-a
| <a name="input_platform_domain"></a> [platform\_domain](#input\_platform\_domain) | The domain on which the deployed Nebuly platform is made accessible. | `string` | n/a | yes |
| <a name="input_postgres_server_admin_username"></a> [postgres\_server\_admin\_username](#input\_postgres\_server\_admin\_username) | The username of the admin user of the PostgreSQL Server. | `string` | `"nebulyadmin"` | no |
| <a name="input_postgres_server_alert_rules"></a> [postgres\_server\_alert\_rules](#input\_postgres\_server\_alert\_rules) | The Azure Monitor alert rules to set on the provisioned PostgreSQL server. | <pre>map(object({<br> description = string<br> frequency = string<br> window_size = string<br> action_group_id = string<br> severity = number<br><br> criteria = optional(<br> object({<br> aggregation = string<br> metric_name = string<br> operator = string<br> threshold = number<br> })<br> , null)<br> dynamic_criteria = optional(<br> object({<br> aggregation = string<br> metric_name = string<br> operator = string<br> alert_sensitivity = string<br> })<br> , null)<br> }))</pre> | `{}` | no |
| <a name="input_postgres_server_high_availability"></a> [postgres\_server\_high\_availability](#input\_postgres\_server\_high\_availability) | High-availability configuration of the DB server. Possible values for mode are: SameZone or ZoneRedundant. | <pre>object({<br> enabled : bool<br> mode : string<br> standby_availability_zone : optional(string, null)<br> })</pre> | <pre>{<br> "enabled": true,<br> "mode": "SameZone"<br>}</pre> | no |
| <a name="input_postgres_server_high_availability"></a> [postgres\_server\_high\_availability](#input\_postgres\_server\_high\_availability) | High-availability configuration of the DB server. Possible values for mode are: SameZone or ZoneRedundant. | <pre>object({<br> enabled : bool<br> mode : optional(string, "SameZone")<br> standby_availability_zone : optional(string, null)<br> })</pre> | <pre>{<br> "enabled": true,<br> "mode": "SameZone"<br>}</pre> | no |
| <a name="input_postgres_server_lock"></a> [postgres\_server\_lock](#input\_postgres\_server\_lock) | Optionally lock the PostgreSQL server to prevent deletion. | <pre>object({<br> enabled = optional(bool, false)<br> notes = optional(string, "Cannot be deleted.")<br> name = optional(string, "terraform-lock")<br> })</pre> | <pre>{<br> "enabled": true<br>}</pre> | no |
| <a name="input_postgres_server_maintenance_window"></a> [postgres\_server\_maintenance\_window](#input\_postgres\_server\_maintenance\_window) | The window for performing automatic maintenance of the PostgreSQL Server. Default is Sunday at 00:00 of the timezone of the server location. | <pre>object({<br> day_of_week : number<br> start_hour : number<br> start_minute : number<br> })</pre> | <pre>{<br> "day_of_week": 0,<br> "start_hour": 0,<br> "start_minute": 0<br>}</pre> | no |
| <a name="input_postgres_server_max_storage_mb"></a> [postgres\_server\_max\_storage\_mb](#input\_postgres\_server\_max\_storage\_mb) | The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4193280, 4194304, 8388608, 16777216 and 33553408. | `number` | `262144` | no |
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ locals {

current_ip = chomp(data.http.current_ip.response_body)

postgres_server_name = format("%snebuly", var.resource_prefix)
postgres_server_name = format("%snebulydb", var.resource_prefix)
postgres_server_configurations = {
"azure.extensions" : "vector,pgaudit",
"shared_preload_libraries" : "pgaudit",
Expand Down Expand Up @@ -501,7 +501,7 @@ resource "azurerm_storage_account" "main" {

network_rules {
default_action = "Deny"
ip_rules = []
ip_rules = var.whitelist_current_ip ? [local.current_ip] : []
virtual_network_subnet_ids = [local.aks_nodes_subnet.id]
}

Expand Down
24 changes: 11 additions & 13 deletions tests/dev-provisioning/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ variable "location" {
data "azuread_group" "engineering" {
display_name = "nebuly-engineering"
}
data "http" "my_ip" {
url = "https://ipv4.icanhazip.com"
}
locals {
my_ip = chomp(data.http.my_ip.response_body)
}

module "platform" {
source = "../../"
Expand All @@ -71,17 +65,21 @@ module "platform" {
platform_domain = "platform.azure.testing"

postgres_server_sku = {
tier = "GP"
name = "Standard_D2ads_v5"
tier = "B"
name = "Standard_B2ms"
}
postgres_server_high_availability = {
enabled = false
}

azure_openai_location = "EastUS"
key_vault_public_network_access_enabled = true
key_vault_network_acls = {
ip_rules = [local.my_ip]
virtual_network_subnet_ids = []
azure_openai_location = "EastUS"
azure_openai_rate_limits = {
gpt_4 = 1
gpt_4o_mini = 1
}

key_vault_public_network_access_enabled = true

aks_cluster_admin_object_ids = [data.azuread_group.engineering.id]
resource_prefix = var.resource_prefix

Expand Down
2 changes: 1 addition & 1 deletion tests/dev-provisioning/terraform.auto.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### General ###
location = "WestEurope"
location = "NorthEurope"
resource_prefix = "nbltst"
resource_group_name = "rg-platform-inttest"
tags = {
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ variable "postgres_server_high_availability" {
description = "High-availability configuration of the DB server. Possible values for mode are: SameZone or ZoneRedundant."
type = object({
enabled : bool
mode : string
mode : optional(string, "SameZone")
standby_availability_zone : optional(string, null)
})
default = {
Expand Down

0 comments on commit 53e2597

Please sign in to comment.