Merge pull request #204 from cloud-neutral-workshop/codex/fix-invalid-file-path-in-locals.tf
Simplify bootstrap config path input
This commit is contained in:
commit
acc12df087
@ -1,9 +1,5 @@
|
||||
locals {
|
||||
config_root = coalesce(var.config_root, abspath("${path.module}/../../../../../gitops"))
|
||||
bootstrap_config_path = coalesce(
|
||||
var.bootstrap_config_path,
|
||||
"${local.config_root}/config/accounts/bootstrap.yaml"
|
||||
)
|
||||
bootstrap_config_path = abspath(var.bootstrap_config_path)
|
||||
|
||||
bootstrap = yamldecode(file(local.bootstrap_config_path))
|
||||
|
||||
|
||||
@ -13,7 +13,11 @@ variable "region" {
|
||||
variable "bootstrap_config_path" {
|
||||
description = "Path to the bootstrap account configuration YAML"
|
||||
type = string
|
||||
default = null
|
||||
|
||||
validation {
|
||||
condition = var.bootstrap_config_path != null && trim(var.bootstrap_config_path) != ""
|
||||
error_message = "Set bootstrap_config_path to the GitHub Action environment input that points to the bootstrap YAML file."
|
||||
}
|
||||
}
|
||||
|
||||
variable "config_root" {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user