Terraform
License and product usage reporting
This topic describes how to enable Terraform Enterprise to report license and product usage information to HashiCorp. This topic also outlines how HashiCorp uses license and product data it collects when automated data reporting is enabled. It is enabled by default, but automated license and product utilization data reporting can be disabled separately.
Data reporting privacy
The process is GDPR compliant and consists of mostly computed metrics that never contain personal identifiable information (PII) or other sensitive information. Automated reporting shares the data with HashiCorp using a secure, unidirectional HTTPS API and makes an auditable record in the product logs each time it submits a report.
Enable automated license utilization reporting
When automated license usage reporting is enabled, Terraform sends HashiCorp the minimum data required to validate license usage as defined in our contracts. As a result, you do not have to manually collect and report the usage data.
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. For instructions on how to forward your license usage data to a monitoring solution, refer to the following topics for instructions on forwarding logs:
- Enable log forwarding on Replicated installations
- Enable log forwarding on non-Replicated installations.
To enable automated reporting, you need to make sure that outbound network traffic is configured correctly and upgrade your enterprise product to a version that supports it. If your installation is air-gapped or network settings are not in place, automated reporting will not work.
Allow outbound HTTPS traffic on port 443
Make sure that your network allows HTTPS egress on port 443 from https://reporting.hashicorp.services
by allow-listing the following IP addresses:
Make sure that your network also allows egress to https://api.replicated.com
as described in the network requirements documentation.
Upgrade Terraform Enterprise
Upgrade to Terraform Enterprise v202305-1 or later.
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.
{
"@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.
Manually reporting these metrics can be time consuming. Opting out of automated reporting does not mean that you also opt out from sending license utilization metrics. Customers who opt out of automated reporting will still be required to manually collect and send license utilization metrics to HashiCorp.
If you are considering opting out because you’re worried about the data, we strongly recommend that you review the example payloads before opting out. If you have concerns with any of the automatically-reported data please bring them to your account manager.
Add the following JSON to the Replicated Application Settings Config (settings.json
), then check the product logs for a confirmation message.
{
"optout_license_reporting": {
"value": 1
}
}
If you are on a standalone installation, you can also configure this setting in the Replicated Admin Console UI.
Now restart your system.
Check your product logs roughly 24 hours after opting out to make sure that the system isn’t trying to send reports.
Refer to the License data reference for information about the license data Terraform Enterprise reports to HashiCorp.
Enable product usage reporting
Terraform Enterprise reports product usage data to HashiCorp in order to guide you through data insights and improve product value, experience, and quality. You can enable and disable product usage reporting separately from license utilization reporting.
Allow outbound HTTPS traffic on port 443
Make sure that your network allows egress to https://api.replicated.com
, as described in the network requirements documentation.
Make sure that your network also allows HTTPS egress on port 443 from https://reporting.hashicorp.services
by allow-listing the following IP addresses:
Upgrade Terraform Enterprise
Upgrade to Terraform Enterprise v202402-1 or later.
Check logs
Terraform starts sending data within approximately 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.
Opt out of product usage reporting
If your installation is air-gapped or you do not want to report product utilization data to HashiCorp, you can opt out of reporting.
Add the following JSON to the Replicated application settings configuration specifying in the
settings.json
file.{ "optout_usage_reporting": { "value": 1 } }
If you are on a standalone installation, you can also configure this setting in the Replicated admin console UI.
- Restart your system.
- Check your product logs roughly 24 hours after opting out to make sure that the system does not send reports.
Product data collection reference
The following JSON payload describes the product usage data that Terraform Enterprise collects.
{
"payload":{
"payload_version":"1",
"license_id":"${LICENSE_IDENTIFIER}",
"product":"terraform",
"product_version":"${TFE_VERSION}",
"export_timestamp":"${TIME_OF_EXPORT}",
"snapshots":[
{
"snapshot_version":1,
"snapshot_id":"${SNAPSHOT_ID}",
"process_id":"${PROCESS_ID}",
"timestamp":"${TIME_OF_EXPORT}",
"schema_version":"1.1.0",
"service":"terraform",
"metrics":{
"billable_rum_count":{
"key":"billable_rum_count",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_count_workspace_80th_percentile":{
"key":"billable_rum_count_workspace_80th_percentile",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_count_workspace_avg":{
"key":"billable_rum_count_workspace_avg",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_count_workspace_max":{
"key":"billable_rum_count_workspace_max",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_count_workspace_median":{
"key":"billable_rum_count_workspace_median",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_count_workspace_min":{
"key":"billable_rum_count_workspace_min",
"kind":"counter",
"mode":"write",
"value":1
},
"billable_rum_opt_in":{
"key":"billable_rum_opt_in",
"kind":"counter",
"mode":"write",
"value":1
},
"workspacecount":{
"key":"workspacecount",
"kind":"counter",
"mode":"write",
"value":0
}
}
}
],
"metadata":{
}
}
}