Hi there,
I’m loving the use of ERB templating within my terraform code to differentiate between environments. I’m supporting a bunch of legacy terraform code that needs to be re-written, but terraspace is severely helping me out with this.
Unfortunately, terraform fmt
no longer functions because of course - the templating language used within terraspace is not producing valid HCL. Here’s an example block I’m using:
data "terraform_remote_state" "vpc-<%= expansion(':ENV-:REGION') %>" {
backend = "remote"
config = {
organization = "my-org"
workspaces = {
name = "org-<%= expansion(':ENV-:REGION') %>-vpc-network"
}
}
}
Is there something you would recommend so that I can regain use of fmt
?