This repository provides a Terraform provider for the
Bunny.net CDN platform.
It supports to manage Pull and Storage Zones.
-
Build and install the provider binary via:
make install
-
Use the Development Overrides for Provider Developers feature to enforce using the local
terraform-provider-bunny
binary.
Run:make gen-dev-tftrc
to generate a terraform config with
dev_overrides
statement, referencing the directorymake install
installed the binary to. -
Instruct Terraform to use the new config file instead of the default one by setting the
TF_CLI_CONFIG_FILE
to the path of the generatedbunny-dev.tftrc
file. For example:export TF_CLI_CONFIG_FILE="/home/fho/tf-provider-bunny-dev.tftrc"
To run the integration tests a bunny.net account is needed. The integration tests will create, modify and delete real resources. Therefore a bunny.net account should be used that does not manage resources used in production.
To run the integration tests set the BUNNY_API_KEY
to your bunny.net API
key:
export BUNNY_API_KEY=MY-TOKEN
Then run:
make testacc
To cleanup resources that might have been left over by running tests, run:
make sweep
make docs
-
Ensure the entry for the version in CHANGELOG.md is uptodate.
(Keep the(Unreleased)
marker.) -
Run:
scripts/create-release.sh VERSION
To finalize the CHANGELOG.md file, create a signed git tag, build the release binaries create a GitHub draft release with the binaries.
-
Publish the draft release on github.
- unsupported Pull Zone features:
burst_size
dns_record_id
dns_zone_id
enable_cookie_vary
enable_query_string_ordering
limit_rate_after
limit_rate_per_second
origin_shield_enable_concurrent_limit
origin_shield_max_concurrent_requests
origin_shield_max_queued_requests
origin_shield_queue_max_wait_time
use_stale_while_offline
use_stale_while_updating
limits
block:limit_rate_per_second
limit_rate_after
burst_size
- Pull Zone fields with missing write support:
blocked_referrers
- all
enable_geo_zone_*
fields
The provider is under initial development and should be considered as
unstable.
Breaking API changes can happen anytime.