Skip to content

Commit

Permalink
fix: Database recreation keepers
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks authored Sep 15, 2022
1 parent 400cecc commit 3a29511
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/database/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ resource "random_string" "master_password" {
special = false
}

locals {
version_list = split(var.database_version, "_")
version_kepper = "${version_list[0]}_${version_list[1]}_${version_list[2]}"
}

resource "random_pet" "mysql" {
length = 2
keepers = {
version = var.version_kepper
}
}

locals {
Expand Down

0 comments on commit 3a29511

Please sign in to comment.