Skip to content

Commit

Permalink
fix for computed_major_engine_version in case of postgres (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximmi authored Oct 12, 2019
1 parent f72e724 commit d5c5534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "final_snapshot_label" {
}

locals {
computed_major_engine_version = join(".", slice(split(".", var.engine_version), 0, 2))
computed_major_engine_version = var.engine == "postgres" ? join(".", slice(split(".", var.engine_version), 0, 1)) : join(".", slice(split(".", var.engine_version), 0, 2))
major_engine_version = var.major_engine_version == "" ? local.computed_major_engine_version : var.major_engine_version
}

Expand Down

0 comments on commit d5c5534

Please sign in to comment.