Open lornasong opened 3 years ago
Consul-template re-uses it's child process running sub-module for this. It is most likely overkill for this case and I'd probably not recommend it (if you were even thinking of this).
Random passing thought... what about gRPC or hashicorp/go-plugins for this? Seems like you could better integrate running the 'script' this way than an external shell call if that was desirable.
Linking in this bug ticket https://github.com/hashicorp/consul-terraform-sync/issues/125 that the feature should also consider that the script/commits should only run if the Terraform plan/apply have a diff
Support a task-level feature that executes a user-configured custom scripts after a task updates network infrastructure. This feature would be similar to Consul-Template’s support for exec command. It would allow users the flexibility to write their own custom scripts as needed without dependency on CTS.
An example of what this could look like (subject to change):
This feature removes the need for custom third-party support. Currently, CTS's only third-party support is for the PANOS out-of-band commit. We would like to remove related code afterwards since this feature can replace this use-case.
The existing PANOS commit could be supported by this new feature by using the PANOS commit script and a process similar to the one described in the PANOS commit guide. An example of CTS could support the PANOS commit