I am working on converting manual global init scripts into a terraform IaC process for multiple environments. Within terraform, we are using the resource "databricks_global_init_script" and set the content_base64 with the following:
base64encoded(<<-EOT
#!/bin/bash
pip3 install pyodbc
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql17
pip3 install --upgrade pyodbc
EOT
)
However, when I call the rest api's to view the global init script to compare against my manual entry, the encoded base64 string is different. The version terraform is creating is not working. Why would terraform be creating a different encoded base64 string?