When you create a Stream library, bunny.net automatically provisions a Pull Zone and Storage Zone. To manage these resources with Terraform, you need to import them into your state.
Define the stream library
Create or update your Terraform configuration with the stream library resource: Apply the configuration
Run apply to create or sync the library: Add resources with import blocks
Define the associated Pull Zone and Storage Zone resources, along with import blocks: Apply to import
Run apply to import the resources into your Terraform state:The Pull Zone and Storage Zone are now managed by Terraform. Define the stream library
Create or update your Terraform configuration with the stream library resource: Apply the configuration
Run apply to create or sync the library: Add resources and outputs
Define the associated Pull Zone and Storage Zone resources, with outputs to retrieve their IDs: Get the resource IDs
Run plan to retrieve the Pull Zone and Storage Zone IDs from the outputs:Note the IDs shown in the output. Import the resources
Use the IDs to import each resource into your Terraform state:Replace <pullzone_id> and <storage_zone_id> with the actual IDs from the previous step. Last modified on June 26, 2026