Open aleckramarczyk opened 3 months ago
This would allow you to consistently reference the path to a directory as a variable. For instance, being able to reference a modules directory.
--- root_file: true vars: tenant: default aws_region: us-west-1 template_files: _backend.tf: | terraform { backend "s3" { bucket = "my-state-bucket" dynamodb_table = "my-lock-table" encrypt = true key = "{{ .Vars.tfgen_state_key }}/terraform.tfstate" region = "{{ .Vars.aws_region }}" role_arn = "arn:aws:iam::{{ .Vars.aws_account_id }}:role/terraformRole" } } _provider.tf: | provider "aws" { region = "{{ .Vars.aws_region }}" allowed_account_ids = [ "{{ .Vars.aws_account_id }}" ] } _vars.tf: | variable "env" { type = string default = "{{ .Vars.env }}" } variable "modules-directory" { type = string default = "{{ .Vars.target_to_root_relative_path }}/modules" }
Hi @aleckramarczyk , what would be your usecase for this one, since using variables for the module's source isn't allowed?
This would allow you to consistently reference the path to a directory as a variable. For instance, being able to reference a modules directory.