diff --git a/infrastructure/main.tf b/infrastructure/main.tf index f0f1608ed..67e5beafc 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -1,7 +1,7 @@ locals { app_full_name = "xui-${var.component}" ase_name = "core-compute-${var.env}" - local_env = (var.env == "preview" || var.env == "spreview") ? (var.env == "preview" ) ? "aat" : "saat" : var.env + local_env = (var.env == "preview" || var.env == "spreview") ? (var.env == "preview") ? "aat" : "saat" : var.env shared_vault_name = "${var.shared_product_name}-${local.local_env}" } @@ -34,6 +34,10 @@ module "redis6-cache" { business_area = "cft" private_endpoint_enabled = true public_network_access_enabled = false + sku_name = var.sku_name + family = var.family + capacity = var.capacity + } resource "azurerm_application_insights" "appinsights" { diff --git a/infrastructure/output.tf b/infrastructure/output.tf index 8d32de759..39194c45b 100644 --- a/infrastructure/output.tf +++ b/infrastructure/output.tf @@ -3,6 +3,6 @@ output "microserviceName" { } output "appInsightsInstrumentationKey" { - value = azurerm_application_insights.appinsights.instrumentation_key + value = azurerm_application_insights.appinsights.instrumentation_key sensitive = true } diff --git a/infrastructure/prod.tfvars b/infrastructure/prod.tfvars new file mode 100644 index 000000000..10c3eb0e6 --- /dev/null +++ b/infrastructure/prod.tfvars @@ -0,0 +1,3 @@ +sku_name = "Premium" +family = "P" +capacity = "1" \ No newline at end of file diff --git a/infrastructure/provider.tf b/infrastructure/provider.tf index d9fe1b436..b2a9f05c5 100644 --- a/infrastructure/provider.tf +++ b/infrastructure/provider.tf @@ -4,14 +4,14 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "~> 3.19.1" + version = "~> 3.75.0" } } - required_version = "~> 1.3.5" + required_version = "~> 1.5.7" } provider "azurerm" { - features {} + features {} } diff --git a/infrastructure/variables.tf b/infrastructure/variables.tf index 42815b2df..d4d68da97 100644 --- a/infrastructure/variables.tf +++ b/infrastructure/variables.tf @@ -9,7 +9,7 @@ variable "location" { variable "env" {} variable "shared_product_name" { - default = "rpx" + default = "rpx" } variable "subscription" {} @@ -22,3 +22,17 @@ variable "application_type" { default = "web" description = "Type of Application Insights (Web/Other)" } +variable "family" { + default = "C" + description = "The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for Premium). Use P for higher availability, but beware it costs a lot more." +} + +variable "sku_name" { + default = "Basic" + description = "The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`." +} + +variable "capacity" { + default = "1" + description = "The size of the Redis cache to deploy. Valid values are 1, 2, 3, 4, 5" +}