Skip to content

Commit

Permalink
feat: Add 'redis' postfix to name if 'name_postfix' is omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrTitov committed Apr 12, 2023
1 parent 46780a9 commit 2d34569
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 @@ -4,7 +4,7 @@ data "huaweicloud_availability_zones" "zones" {

locals {
availability_zone = length(var.availability_zones) == 0 ? join(",", slice(data.huaweicloud_availability_zones.zones.names, 0, var.az_number)) : join(",", var.availability_zones)
redis_instance_name = var.name_postfix == null ? var.name : format("%s-redis-%s", var.name, var.name_postfix)
redis_instance_name = var.name_postfix == null ? format("%s-redis", var.name) : format("%s-redis-%s", var.name, var.name_postfix)
}

resource "huaweicloud_gaussdb_redis_instance" "main" {
Expand Down

0 comments on commit 2d34569

Please sign in to comment.