It seems to be any bash script
I'm using terraform to deploy the stand-alone AWS CloudGuard gateway.
I’m using the templatefile function to reference a batch script.
In the aws_instance resource, for user_data im passing the raw data via a bash script with associated variables.
i.e. user_data = templatefile("${path.module}/gw_user_data.sh", {vars}
The bash script is located in the path of the module as specific by the interpolation above ${path.module}.
Validation and plan operations complete successfully.
However the gateway is not being configured with this data with the instance is launched.