Skip to main content

What you’ll need

Before you begin, make sure you have:

Quickstart

1

Set up your project

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.
2

Initialize Terraform

Run the init command to download the bunny.net provider:
3

Define your resources

Create a main.tf file with your infrastructure. This example creates a Storage Zone with an index file and a Pull Zone:
Replace my-project-name with your desired project name.
4

Preview and apply

Preview the changes Terraform will make:
Apply the configuration to create your resources:
Type yes when prompted to confirm.
5

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