Am trying to set labels on Google cloud instances that are upper case and include special characters like “.” and “:”. Since this is a port of an existing application from AWS changing semantics of the labels is not a possibility.
I explored the possibility of using base32 encoding to get around this (base64 does not work because it is mixed case which does not work with GCP labels). There is an open pull request for terraform to have base32 support (introduces base32 related encoding functions with documentation by ufukty · Pull Request #29127 · hashicorp/terraform · GitHub) but that has not been merged.
Given the lack of a base32 function in terraform, I was hoping I could get terraform to preprocess + expand + interpolate my files and write them out as fully expanded terraform files, which I can then postprocess using a script to base32 encode the labels before I do terraform plan/apply on the results. Want to know if there is a way to get preprocessed output out of terraform - especially where constructs like the for-each and count have been expanded away ?