Compare commits

..

5 Commits

Author SHA1 Message Date
unkin-agent 3a64bf2482 Describe the destination_ports fork change accurately
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
2026-11-16 23:19:00 +11:00
unkin-agent 5978c20f99 Rewrite README as a fork overview with quick start
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
2026-11-16 23:13:13 +11:00
unkin-agent 3e90a4506a Use the IUCLabs/binarylane provider address and add a make docs target 2026-11-16 23:13:12 +11:00
benvin a197444c4e Merge pull request 'ci: authenticate artifactapi provider upload with a vault token' (#5) from benvin/artifactapi-upload-token into main
Reviewed-on: #5
2026-10-25 22:58:25 +11:00
unkin-agent c1acb29c8c ci: authenticate artifactapi provider upload with a vault token
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-10-25 20:34:19 +11:00
15 changed files with 62 additions and 143 deletions
+8 -1
View File
@@ -35,9 +35,16 @@ steps:
- |
VERSION=$$(echo ${CI_COMMIT_TAG} | sed 's/^v//')
FILE="terraform-provider-binarylane_$${VERSION}_linux_amd64.zip"
set -o pipefail
VAULT="https://vault.service.consul:8200"
AUTH=$$(mktemp)
VT=$$(jq -n --rawfile jwt /var/run/secrets/kubernetes.io/serviceaccount/token '{role:"woodpecker_artifactapi_writer",jwt:$$jwt}' \
| curl -sf -d @- "$$VAULT/v1/auth/k8s/au/syd1/login" | jq -er .auth.client_token) || exit 1
printf 'X-Vault-Token: %s\n' "$$VT" | curl -sf -H @- "$$VAULT/v1/identity/oidc/token/artifactapi-writer" \
| jq -er '"Authorization: Bearer " + .data.token' > "$$AUTH" || exit 1
curl -f -X PUT \
"https://artifactapi.k8s.syd1.au.unkin.net/api/v2/remotes/terraform-unkin/files/unkin/binarylane/$${FILE}" \
-H "Content-Type: application/zip" \
-H "Content-Type: application/zip" -H @"$$AUTH" \
--data-binary @"$${FILE}"
depends_on: [package]
backend_options:
+1 -1
View File
@@ -14,7 +14,7 @@ Based on [this example from the terraform docs](https://developer.hashicorp.com/
provider_installation {
dev_overrides {
# Example GOBIN path, will need to be replaced with your own GOBIN path. Default is $GOPATH/bin
"git.unkin.net/unkin/binarylane" = "/path/to/terraform-provider-binarylane/bin"
"IUCLabs/binarylane" = "/path/to/terraform-provider-binarylane/bin"
}
direct {}
+5 -2
View File
@@ -1,10 +1,10 @@
.PHONY: build install test lint fmt clean tidy package pre-commit patch minor major check-go
.PHONY: build install test lint fmt clean tidy package pre-commit patch minor major check-go docs
BINARY := terraform-provider-binarylane
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev")
OS_ARCH := linux_amd64
INSTALL_VERSION := $(shell echo $(VERSION) | sed 's/^v//')
INSTALL_DIR := ~/.terraform.d/plugins/git.unkin.net/unkin/binarylane/$(INSTALL_VERSION)/$(OS_ARCH)
INSTALL_DIR := ~/.terraform.d/plugins/registry.terraform.io/iuclabs/binarylane/$(INSTALL_VERSION)/$(OS_ARCH)
ZIP := $(BINARY)_$(INSTALL_VERSION)_$(OS_ARCH).zip
GO_VERSION_REQUIRED := 1.25
@@ -36,6 +36,9 @@ package: build
python3 -c "import zipfile,sys; z=zipfile.ZipFile(sys.argv[1],'w',zipfile.ZIP_DEFLATED); z.write(sys.argv[2]); z.close()" $(ZIP) $(BINARY)_v$(INSTALL_VERSION)
rm $(BINARY)_v$(INSTALL_VERSION)
docs:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name binarylane --rendered-provider-name terraform-provider-binarylane
pre-commit:
uvx pre-commit run --all-files
+37 -128
View File
@@ -1,8 +1,29 @@
# terraform-provider-binarylane
# Terraform Provider for BinaryLane
See the [documentation on the Terraform Registry](https://registry.terraform.io/providers/oscarhermoso/binarylane/latest), or see [examples in the `examples` directory](./examples/README.md).
A Terraform provider for managing [BinaryLane](https://www.binarylane.com.au/) cloud resources: servers, firewall rules, reverse DNS, SSH keys, VPCs and load balancers.
This is a fork of [oscarhermoso/terraform-provider-binarylane](https://github.com/oscarhermoso/terraform-provider-binarylane). It tracks upstream and adds:
- `binarylane_server_reverse_name` resource for managing IPv4 PTR records
- omitting `destination_ports` on `binarylane_server_firewall_rules` (e.g. for ICMP rules) resolves to null after apply instead of leaving it unknown
- server action waits are bounded by a timeout instead of polling forever
## Quick start
```terraform
terraform {
required_providers {
binarylane = {
source = "IUCLabs/binarylane"
}
}
}
provider "binarylane" {
# Or set BINARYLANE_API_TOKEN
api_token = var.binarylane_api_token
}
resource "binarylane_server" "example" {
region = "per"
image = "ubuntu-24.04"
@@ -11,140 +32,28 @@ resource "binarylane_server" "example" {
}
```
## Progress
More complete configurations live in [`examples/`](./examples/README.md).
Planned features:
## Requirements
- [x] Servers
- [x] Firewall Rules
- [x] Cloud Init
- [x] Updating server properties
- [x] "Advanced Features"
- [x] IPV6
- [ ] Customised Backups
- [ ] Software
- [ ] Alerts
- [x] SSH Keys
- [x] Virtual Private Cloud
- [x] Load Balancers
- [ ] Images
- [ ] DNS
- [x] Docs
- [x] Generated docs
- [ ] Review & fill out remaining descriptions
- [ ] Include examples in docs
- [x] Examples
- [x] Basic
- [x] Cloud Init
- [x] K3s
- [ ] NixOS
- [ ] Virtual Private Cloud
- [Terraform](https://developer.hashicorp.com/terraform/downloads) >= 1.0 (plugin protocol 6)
- [Go](https://go.dev/doc/install) >= 1.25 to build the provider
- A BinaryLane API token
## Server parameters
## Documentation
### Regions
Provider and resource documentation is in [`docs/`](./docs/index.md), in the Terraform Registry layout. Regenerate it with `make docs` after changing a schema.
<details>
<summary>curl for regions</summary>
## Developing
```sh
curl -X GET "https://api.binarylane.com.au/v2/regions" \
-H "Authorization: Bearer $BINARYLANE_API_TOKEN" > tmp/regions.json
jq '[ .regions[] | .slug ] | sort' tmp/regions.json
```
</details>
```json
[
"adl",
"bne",
"mel",
"per",
"sin",
"syd"
]
make build # build the provider binary
make test # unit tests
make docs # regenerate docs/
```
### Images
Acceptance tests run against the live BinaryLane API and need `TF_ACC=1` and `BINARYLANE_API_TOKEN`. See [CONTRIBUTING.md](./CONTRIBUTING.md) for local development overrides.
<details>
<summary>curl for images</summary>
## License
```sh
curl -X GET "https://api.binarylane.com.au/v2/images?type=distribution&&page=1&per_page=200" \
-H "Authorization: Bearer $BINARYLANE_API_TOKEN" > tmp/images.json
jq '[ .images[] | .slug ] | sort' tmp/images.json
```
</details>
```json
[
"alma-10",
"alma-8",
"alma-9",
"byo-os",
"byo-os-uefi",
"byo-os-virtio-disabled",
"cpanel-plus-whm",
"debian-11",
"debian-12",
"debian-13",
"rocky-10",
"rocky-9",
"ubuntu-20.04.6",
"ubuntu-22.04",
"ubuntu-22.04-desktop",
"ubuntu-24.04",
"ubuntu-24.04-neon-desktop",
"ubuntu-26.04",
"windows-2016",
"windows-2016-sql-2016-web",
"windows-2019",
"windows-2019-sql-2017-std",
"windows-2019-sql-2017-web",
"windows-2022",
"windows-2022-sql-2019-std",
"windows-2022-sql-2019-web",
"windows-2025"
]
```
### Sizes
<details>
<summary>curl for sizes</summary>
```sh
curl -X GET "https://api.binarylane.com.au/v2/sizes" \
-H "Authorization: Bearer $BINARYLANE_API_TOKEN" > tmp/sizes.json
jq '[ .sizes[] | .slug ] | sort' tmp/sizes.json
```
</details>
```json
[
"cpu-2thr",
"cpu-4thr",
"cpu-6thr",
"cpu-8thr",
"ded-7900x-800gb",
"ded-e2136-400gb",
"ded-e2136-800gb",
"ded-e2288g-800gb",
"hdd-1000gb",
"hdd-2000gb",
"hdd-4000gb",
"hdd-500gb",
"hdd-6000gb",
"hdd-8000gb",
"std-1vcpu",
"std-2vcpu",
"std-4vcpu",
"std-6vcpu",
"std-8vcpu",
"std-min"
]
```
[MIT](./LICENSE), as inherited from upstream.
+1 -1
View File
@@ -15,7 +15,7 @@ description: |-
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ If you want to deploy multiple parts of a cloud-init configuration, you can use
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
terraform {
required_providers {
binarylane = {
source = "git.unkin.net/unkin/binarylane"
source = "IUCLabs/binarylane"
}
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ func main() {
flag.Parse()
opts := providerserver.ServeOpts{
Address: "git.unkin.net/unkin/binarylane",
Address: "registry.terraform.io/iuclabs/binarylane",
Debug: debug,
}