UPD: region short now replaced with just the first 2 letters of region name
This commit is contained in:
parent
007bfc1a95
commit
0bd23ee8ba
@ -19,8 +19,10 @@ variable "add-random-suffix" {
|
||||
default = false
|
||||
}
|
||||
|
||||
data aws_region this-region {}
|
||||
|
||||
locals {
|
||||
resource-prefix = "${var.environment}-${var.aws-region-short}-${var.customer-name}-${var.project}"
|
||||
resource-prefix = "${var.environment}-substr(${data.aws_region.this-region.name}, 0, 2)-${var.customer-name}-${var.project}"
|
||||
}
|
||||
|
||||
variable bucket-acl {
|
||||
|
@ -32,14 +32,10 @@ terraform {
|
||||
|
||||
# main.tf
|
||||
locals {
|
||||
aws-region-short = lookup(module.aws-region-short.region-map, var.aws-region)
|
||||
aws-region-short = substr(var.aws-region, 0, 2)
|
||||
resource-prefix = "${var.environment}-${local.aws-region-short}-${var.customer-name}-${var.project}"
|
||||
}
|
||||
|
||||
module "aws-region-short" {
|
||||
source = "git::https://xpk.headdesk.me/git/xpk/terraform.aws-baseline-infra//modules/util/aws-region-short"
|
||||
}
|
||||
|
||||
module "terraform-state-store" {
|
||||
source = "git::https://xpk.headdesk.me/git/xpk/terraform.aws-baseline-infra//modules/terraform-setup"
|
||||
enable-bucket-versioning = true
|
||||
|
Loading…
Reference in New Issue
Block a user