Managing HTTP Log Sources with Terraform
Manage HTTP log sources as code in Terraform
Overview
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.
How to define your Panther HTTP log source in Terraform
The following sections outline how to define your HTTP log source in HashiCorp Configuration Language (HCL).
Prerequisite
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 these instructions for creating an API token in the Panther Console.
Step 1: Choose an authentication method
Select an authentication method for your HTTP endpoint from the options listed on HTTP Source.
The authentication method you select will determine the variables you define in Step 2, below.
Step 2: Define variables
Define a
variables.tf
file with the Panther variables shown in the code block below.
Authentication method-specific variables
In your variables.tf
file, include the values in the Additional variables column below for the authentication method you chose in Step 1.
Step 3: Provide values for the defined variables
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:A GraphQL API URL without the
/public/graphql
suffixA REST API URL as-is (REST URLs do not have a suffix after the root URL)
Step 4: Define the Terraform provider
Add the Panther Terraform provider.
Step 5: Define Panther HTTP log source
The following HCL configuration defines the HTTP log source in Panther.
Last updated
Was this helpful?