Skip to content

Commit

Permalink
fix db name
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed Jan 18, 2024
1 parent 67294e9 commit ff32ad1
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 20 deletions.
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ module "web" {
storage_connection_string = module.web_storage.storage_connection_string
storage_container_name = module.web_storage.storage_container_name
storage_account_base_url = module.web_storage.storage_account_base_url
mongo_db_name = module.web_storage.mongo_db_name
}

module "ilmo" {
Expand Down
2 changes: 1 addition & 1 deletion modules/web/app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resource "azurerm_linux_web_app" "cms" {
app_settings = {
PUBLIC_FRONTEND_URL = "https://${local.fqdn}"
PAYLOAD_MONGO_CONNECTION_STRING = var.mongo_connection_string
PAYLOAD_MONGO_DB_NAME = var.mongo_db_name
PAYLOAD_MONGO_DB_NAME = "cms"
PAYLOAD_SECRET = random_password.payload_secret.result
WEBSITES_PORT = local.payload_port
PAYLOAD_PORT = local.payload_port
Expand Down
4 changes: 0 additions & 4 deletions modules/web/app/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ variable "mongo_connection_string" {
type = string
sensitive = true
}
variable "mongo_db_name" {
type = string
sensitive = true
}
variable "google_oauth_client_id" {
type = string
sensitive = true
Expand Down
10 changes: 0 additions & 10 deletions modules/web/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ resource "azurerm_cosmosdb_account" "db_account" {
}
}

resource "azurerm_cosmosdb_mongo_database" "db" {
name = "cms-${terraform.workspace}"
resource_group_name = var.resource_group_name
account_name = azurerm_cosmosdb_account.db_account.name
autoscale_settings {
# CosmosDB free tier allows for a throughput of 1000 at max
max_throughput = 1000
}
}

resource "azurerm_storage_account" "tikweb_storage_account" {
name = "tikwebstorage${terraform.workspace}"
resource_group_name = var.resource_group_name
Expand Down
4 changes: 0 additions & 4 deletions modules/web/storage/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ output "mongo_connection_string" {
value = azurerm_cosmosdb_account.db_account.primary_mongodb_connection_string
sensitive = true
}
output "mongo_db_name" {
value = azurerm_cosmosdb_mongo_database.db.name
sensitive = true
}

// Storage

Expand Down

0 comments on commit ff32ad1

Please sign in to comment.