Skip to content

Commit

Permalink
Change override logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ltellesfl committed Feb 11, 2025
1 parent aafa851 commit 033ba94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
14 changes: 8 additions & 6 deletions azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,14 @@ module "readapi_queue" {
providers = {
azurerm = azurerm.readapi
}
source = "app.terraform.io/indico/indico-azure-readapi-queue/mod"
version = "1.1.0"
readapi_type = var.readapi_type
readapi_name = var.readapi_type == "create" ? lower("${var.account}-${var.label}-s") : var.readapi_name
azure_resource_group = var.azure_resource_group
readapi_queue_name = var.readapi_queue_name
source = "app.terraform.io/indico/indico-azure-readapi-queue/mod"
version = "1.1.0"
label = var.label
account = var.account
readapi_type = var.readapi_type
readapi_name_override = var.readapi_name_override
azure_resource_group_override = var.readapi_azure_resource_group_override
readapi_queue_name_override = var.readapi_queue_name_override
}

locals {
Expand Down
19 changes: 10 additions & 9 deletions azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -827,21 +827,22 @@ variable "readapi_type" {
}
}

variable "azure_resource_group" {
variable "readapi_azure_resource_group_override" {
type = string
default = "indico-readapi"
description = "azure resource group where the Computer Vision for read api resides"
default = null
description = "Override the default indico-readapi resource group"
}

variable "readapi_name" {
variable "readapi_name_override" {
type = string
default = ""
description = "azure Computer Vision name for readapi service"
default = null
description = "Override the default indico-readapi name"
}

variable "readapi_queue_name" {
type = string
default = "readapi"
variable "readapi_queue_name_override" {
type = string
default = null
description = "Override the default indico-readapi-queue name"
}

variable "blob_type" {
Expand Down

0 comments on commit 033ba94

Please sign in to comment.