hex

Terraform: converting hex and decimal representation of random_id back to id

The random_id Terraform resource generates a value that can be used to create remote infrastructure that requires a unique identifier. The primary attribute it exposes is ‘.id’ which contains upper+lower+number characters, but it also has ‘.dec’ and ‘.hex’ equivalent representations that can be used to support infrastructure requiring a limited character set. As an example, Terraform: converting hex and decimal representation of random_id back to id

Bash: Fixing an ASCII text file changed with Unicode character sequences

File encoding issues are difficult to diagnose and troubleshoot.  Most files in the operations world are expected to be text-only ASCII 7 bit, so if a file goes into UTF-8 encoding and has embedded Unicode character inserted, it can often throw off the tool chain or systems using the file. Here are two example files, Bash: Fixing an ASCII text file changed with Unicode character sequences