What you’ll need
Before you begin, make sure you have:- A bunny.net account
- Terraform installed on your machine
- Your bunny.net API key
Quickstart
Set up your project
- New project
- Existing project
- From template
Create a new directory and add the provider configuration:Create a
provider.tf file with the following content:You can also use the
BUNNYNET_API_KEY environment variable instead of
hardcoding your API key. See Authentication for
more options.Define your resources
Create a Replace
main.tf file with your infrastructure. This example creates a Storage Zone with an index file and a Pull Zone:my-project-name with your desired project name.Preview and apply
Preview the changes Terraform will make:Apply the configuration to create your resources:Type
yes when prompted to confirm.Verify your deployment
Open the bunny.net dashboard to see your new resources. Your content is now being served through the bunny.net CDN.
Next steps
Resources
Explore all available Terraform resources
Data Sources
Query existing bunny.net resources
Authentication
Configure provider authentication options
Provider docs
Official Terraform Registry documentation