Fix bootstrap config path references

This commit is contained in:
cloudneutral 2025-12-10 12:53:44 +08:00
parent 37c13610a3
commit 88cfe647a8
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
locals {
bootstrap = yamldecode(file("${path.root}/../../config/accounts/bootstrap.yaml"))
bootstrap = yamldecode(file("${path.module}/../../config/accounts/bootstrap.yaml"))
config_account_name = coalesce(var.account_name, local.bootstrap.account_name)
config_region = coalesce(var.region, local.bootstrap.region)
@ -10,7 +10,7 @@ locals {
}
locals {
account_file_path = "${path.root}/../../../config/accounts/${local.config_account_name}.yaml"
account_file_path = "${path.module}/../../../config/accounts/${local.config_account_name}.yaml"
account = fileexists(local.account_file_path) ? yamldecode(file(local.account_file_path)) : {
account_id = local.bootstrap.account_id
environment = local.environment

View File

@ -1,5 +1,5 @@
locals {
bootstrap = yamldecode(file("${path.root}/../../config/accounts/bootstrap.yaml"))
bootstrap = yamldecode(file("${path.module}/../../config/accounts/bootstrap.yaml"))
dynamodb_table_name = coalesce(var.table_name, local.bootstrap.state.dynamodb_table_name)
region = coalesce(var.region, local.bootstrap.region)

View File

@ -1,5 +1,5 @@
locals {
bootstrap = yamldecode(file("${path.root}/../../config/accounts/bootstrap.yaml"))
bootstrap = yamldecode(file("${path.module}/../../config/accounts/bootstrap.yaml"))
bucket_name = coalesce(var.bucket_name, local.bootstrap.state.bucket_name)
region = coalesce(var.region, local.bootstrap.region)