Introduction
If your Terraform Enterprise is not publicly accessible over the internet, you may need to perform additional configuration to integrate with ServiceNow. This guide provides the steps to route API traffic from Terraform Enterprise through a ServiceNow MID Server.
Prerequisites
- A Terraform Enterprise instance which is not publicly accessible over the internet.
- A configured ServiceNow instance with the Terraform application.
- A functional MID Server within your ServiceNow environment.
Expected Outcome
After completing this procedure, API requests from the ServiceNow Terraform application will be routed through your designated MID Server, and the requests will be visible in the MID Server logs.
Procedure
To route API traffic through a MID server, follow these steps within your ServiceNow instance.
- Switch the application scope to Terraform.
- Navigate to System Web Services > Outbound > REST Message.
- Filter the records to show only those where the Application is
Terraform. - For each record that requires MID Server routing, perform the following steps:
- Open the REST Message record.
- Scroll down to the HTTP Methods related list.
- Select an HTTP Method (e.g., GET, POST) to open its configuration page.
- On the HTTP Request tab, select your MID server from the Use MID Server dropdown list.
- Select Update to save the changes.
- Repeat step 4 for all other necessary REST Message records and their associated HTTP Methods.
After you complete this configuration, requests are registered in the MID server logs, confirming that traffic is being routed correctly.
Additional Information
Consult the official ServiceNow documentation for more details on MID Server configuration and the Terraform Enterprise documentation for the Service Now integration for best practices.