I have a basic example like so:
data "local_file" "input" {
filename = "${path.module}/test.txt"
}
output "test"{
value = jsonencode({
"name": "GITLAB_OMNIBUS_CONFIG",
"value": data.local_file.input.content
})
}
test.txt
contains the following:
external_url 'https://gitlab.company.com'
gitlab_rails['time_zone'] = 'UTC'
gitlab_rails['object_store']['enabled'] = true
gitlab_rails['object_store']['proxy_download'] = false
gitlab_rails['object_store']['connection'] = {
'provider' => 'AWS',
'region' => 'eu-west-2',
'use_iam_profile' => true
}
I am trying to replace the value
in jsonencode with what is in the text file. Is this behaviour possible?