Terraform
Enable automated license utilization reporting
This topic describes how to enable Terraform Enterprise to automatically report license usage information to HashiCorp. Refer to Terraform Enterprise license data reference for information about the license data Terraform Enterprise sends to HashiCorp.
Introduction
License usage reports provide the following benefits:
- Insight into how much more you can deploy under your current contract.
- Protection against over-utilization.
- Predictable consumption for budgeting purposes.
Additionally, you can review license usage with your existing monitoring solutions, such as Splunk and Datadog. Monitoring license consumption enables you to optimize and manage your deployments. Refer to Monitor Terraform Enterprise for instructions on how to enable log forwarding for non-Replicated runtimes. Refer to documentation for enabling log forwarding for Replicated deployments if Terraform is deployed to Replicated.
Requirements
Configure your network to allow outbound HTTPS traffic on port
443
.Configure your network to allow HTTPS egress on port
443
fromhttps://reporting.hashicorp.services
by allow-listing the following IP addresses:Configure your network to allow egress to
https://api.replicated.com
Refer to Configure network access for additional information.
Enable license reporting
Terraform is configured to automatically report license usage data by default. When enabled, Terraform sends HashiCorp the minimum data required to validate license usage as defined in our contracts in order to guide you through data insights and improve product value, experience, and quality. Refer to Opt out of license utilization reporting for instructions on how to disable automatic reports.
Check logs
Terraform Enterprise automatically begins reporting license utilization data within approximately 24 hours from start up. Refer to Log location and format to verify that the data sent successfully.
{
"@level": "debug",
"@message": "export finished successfully",
"@module": "tfe-licensing.licensingexporter",
"@timestamp": "2023-05-10T17:48:06.656979Z"
}
If your installation is air-gapped or your network does not allow the correct egress, logs show the following error:
{
"@level": "error",
"@message": "error exporting snapshot",
"@module": "tfe-licensing.census",
"@timestamp": "2023-05-11T01:50:51.662155Z",
"err": "export failed with error POST https://reporting.hashicorp.services giving up after 5 attempt(s): Post \"https://reporting.hashicorp.services\": dial tcp 35.166.5.222:443: i/o timeout"
}
In this case, reconfigure your network to allow egress and check back in roughly 24 hours.
Opt out of license utilization reporting
If your installation is air-gapped or you want to manually collect and report on the same license utilization metrics, you can opt-out of automated reporting. Note that you are still required to manually collect and send license utilization metrics to HashiCorp, even when you opt out of sending automated license usage reports.
Before opting out, we strongly recommend reviewing the license report reference. Report any concerns related to the automatically-reported data to your account manager.
- Add the following environment variable to your deployment configuration
TFE_LICENSE_REPORTING_OPT_OUT=TRUE
. - Restart the application.
- Check your product logs after approximately 24 hours to verify that the system is no longer attempting to send reports.
Check logs
Automatic license utilization reporting will start sending data within roughly 24 hours. Check the product logs for records that the data sent successfully.
Terraform Enterprise logs report an error when your installation is air-gapped or when your network does not allow the correct egress.