is there any way to create automatic TCP type entries or in configuration files because I’m using yml to upload the server and would like to automate the entries.
If you use ansible, check this module:
You can also use REST API for lot of things, check API Browser
https://docs.graylog.org/en/3.2/pages/configuration/rest_api.html#graylog-rest-api