first commit

This commit is contained in:
tom.chivert committed 2026-01-16 16:20:15 +01:00
commit 3a81d929c6
8 files changed
+137

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# Terraform files
*/.terraform/
*/.terraform.lock.hcl
*/*.tfstate
*/*.tfstate.backup
*/*.tfvars
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026, tchivert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+23
View File
@@ -0,0 +1,23 @@
# Terraform BunnyCDN
POC/exploration of BunnyCDN Terraform provider
## Usage
Export the API key:
```bash
export BUNNYNET_API_KEY="das_key"
```
Navigate to the right project, init and plan:
```bash
cd poc
terraform init
terraform plan
```
## License
MIT
+21
View File
@@ -0,0 +1,21 @@
resource "bunnynet_pullzone" "service" {
name = "${var.name}"
origin {
type = "${var.origin_type}"
url = "${var.origin}"
verify_ssl = "${var.origin_verify_ssl}"
}
routing {
tier = "${var.routing_tier}"
zones = "${var.routing_zones}"
blocked_countries = "${var.routing_blocked_countries}"
}
}
resource "bunnynet_pullzone_hostname" "service" {
pullzone = bunnynet_pullzone.service.id
name = "${var.domain}"
tls_enabled = true
force_ssl = false
}
+7
View File
@@ -0,0 +1,7 @@
terraform {
required_providers {
bunnynet = {
source = "BunnyWay/bunnynet"
}
}
}
+39
View File
@@ -0,0 +1,39 @@
variable "name" {
type = string
default = ""
}
variable "domain" {
type = string
default = ""
}
variable "origin" {
type = string
default = ""
}
variable "origin_type" {
type = string
default = "OriginUrl"
}
variable "origin_verify_ssl" {
type = bool
default = true
}
variable "routing_tier" {
type = string
default = "Standard"
}
variable "routing_zones" {
type = list
default = ["EU"]
}
variable "routing_blocked_countries" {
type = list
default = []
}
+6
View File
@@ -0,0 +1,6 @@
module "pullzone" {
source = "../modules/pullzone"
name = var.name
domain = var.domain
origin = var.origin
}
+14
View File
@@ -0,0 +1,14 @@
variable "name" {
type = string
default = "git-rznet"
}
variable "domain" {
type = string
default = "bunny.git.rznet.fr"
}
variable "origin" {
type = string
default = "https://git.rznet.fr"
}