Terraform Registry
Browse the generated provider, resource, and data source reference.
GitHub repository
View the provider source, examples, and release history.
Use the latest provider release. The examples on this page require
v0.4.0 or later; run terraform init -upgrade to update the version selected in your dependency lock file.What you can manage
The provider supports these Bronto resources:
The provider also includes these data sources:
Prerequisites
Before you begin, you need:- Terraform
1.5or later - A Bronto API endpoint, such as
https://api.eu.bronto.io - A Bronto API key with write permission for the resources you want to manage
Configure the provider
1
Declare the provider
Create a Terraform configuration that uses the latest provider release. The minimum version below includes monitor support:Change
main.tf
bronto_endpoint if your organisation uses another Bronto region or environment. default_tags are merged into every taggable bronto_user, bronto_dashboard, and bronto_widget; tags set directly on a resource take precedence.2
Provide the API key securely
Pass the API key through an environment variable rather than writing it into a committed The provider also supports the
.tf or .tfvars file:BRONTO_ENDPOINT and BRONTO_API_KEY environment variables. In CI, inject credentials from your platformโs secret store.3
Declare a Bronto resource
Add a user resource to the configuration:
main.tf
4
Review and apply the change
Initialise Terraform, validate the configuration, and review the plan before applying it:Commit the generated
.terraform.lock.hcl file so every environment uses the same provider build.Export existing resources from Bronto
Bronto can generate HCL for existing dashboards, monitors, users, Slack integrations, and webhook integrations. This gives you a starting configuration and animport block that adopts the existing object instead of creating a duplicate. Dashboard exports also include their widgets.
The Bronto UI labels the format Terraform (HCL) and the download action Download Terraform. The generated
.tf file is also compatible with OpenTofu.1
Open the resource menu
In Bronto, find the dashboard, monitor, user, Slack integration, or webhook you want to manage as code. Open its actions menu and select Export.
2
Review the generated HCL
The export panel shows the resource block and its matching
import block. For a dashboard, the export includes its widgets. Enable Include referenced metrics when you also want the referenced metric definitions in the generated file.3
Copy or download the configuration
Select Copy to copy the HCL, or Download Terraform to download it as a
.tf file. Add the configuration to your existing Terraform project.4
Plan the import
Run
terraform plan and inspect the proposed import and resource state before applying it. The import adopts the existing Bronto resource; it does not create another one.Manage multiple organisations
Declare an aliased provider for each organisation when a root organisation and its child organisations use different API keys. Then select the correct provider on every resource. Users belong to the root organisation, so managebronto_user resources with the root provider.
main.tf
Recommended workflow
- Run
terraform fmtandterraform validateon every change. - Run
terraform planin pull requests and require review before applying. - Run
terraform init -upgrade, then review and commit the updated.terraform.lock.hcl, when adopting a newer provider release. - Use separate state and API keys for development, staging, and production.
- Avoid editing an IaC-managed resource in both the Bronto UI and your HCL configuration, because the next apply can replace the manual change.
- Review a destroy plan carefully. Removing a resource from configuration can delete the corresponding resource in Bronto.
- Refer to the Terraform Registry for current schemas and examples instead of copying schema details into your own documentation.
Troubleshooting
Authentication fails
Confirm that the API key is active and has permission to read and write every resource in the configuration. Check that the key and endpoint belong to the same Bronto region and organisation.Terraform manages the wrong organisation
When you use provider aliases, addprovider = bronto.<alias> to each resource. Terraform otherwise uses the default, unaliased provider configuration.
