Managing HTTP Log Sources with Terraform
Manage HTTP log sources as code in Terraform
Last updated
Was this helpful?
Manage HTTP log sources as code in Terraform
Last updated
Was this helpful?
You can define your HTTP log source in Terraform using the Panther Terraform provider.
Other methods to create an HTTP log source include using the Panther API directly and manual creation in the Panther Console.
The following sections outline how to define your HTTP log source in HashiCorp Configuration Language (HCL).
Before starting, ensure you have an API URL and token with the Manage Log Sources
permission. This is required to complete Step 3.
If needed, follow .
Select an authentication method for your HTTP endpoint from the .
The authentication method you select will determine the variables you define in Step 2, below.
Define a variables.tf
file with the Panther variables shown in the code block below.
In your variables.tf
file, include the values in the Additional variables column below for the authentication method you chose in Step 1.
SharedSecret
auth_header_key
, auth_secret_value
HMAC
auth_header_key
, auth_secret_value
Bearer
auth_bearer_token
Basic
auth_username
, auth_password
None
Add a *.tfvars
file that assigns values to the variables you defined in Step 2. Note that to complete this section, you will need the API URL and token outlined in the Prerequisite section.
Your panther_api_url
value should be your root API URL. This is either:
Add the Panther Terraform provider.
The following HCL configuration defines the HTTP log source in Panther.
(not recommended)
A without the /public/graphql
suffix
A as-is (REST URLs do not have a suffix after the root URL)