terraform-provider-iterative
terraform-provider-iterative copied to clipboard
`task` configurable logs via hooks via heredoc
Once #392 is achieved we should be able to freely configure the logs output via hooks. The could have a logging
property that would allow us the register the hooks using heredoc.
logging {
hooks {
...
}
}
Did you mean a nested block instead of heredoc by chance?
Hooks can't be added dynamically; they have to be present at compile time. I guess that you want to let users selectively enable and configure some of the hooks we choose to ship with our binaries? E.g. Amazon Web Services CloudWatch, Microsoft Azure Monitor, or Google Cloud Logging as suggested on this thread.
Yes, adding a bunch of preferred hooks
Did you mean a nested block instead of heredoc by chance?
Depends, if there is already a way to to write a config file for the hook we could avoid doing the mapping. I.E. lest suppose that the hook Elasticsearch is like this:
config file
nodes:
192.168.1.1
we could add this as heredoc
It's probaby going to look like this:
resource "iterative_task" example {
···
logs {
syslog = {
protocol = "udp",
address = "127.0.0.1",
priority = "info"
tag = "test",
}
}
}
Anyway, let's focus on #392 first.