mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
terraform/provider: build and test in-tree
Drop the standalone repo's release and git-hook instructions, credit the original author, and list the provider in the terraform layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ea30aa456
commit
a63c809c47
3 files changed
+17
-15
No files matched your search
@@ -33,6 +33,9 @@ terraform/
|
||||
aws-ha-distributed/ 3 masters + 3 volumes (1/AZ) + 2 filers + 1 S3,
|
||||
secure-by-default (mTLS via SSM-delivered certs)
|
||||
aws-all-in-one/ single `weed server` instance via core directly
|
||||
provider/ Terraform provider (Go) that manages S3 buckets and their
|
||||
configuration, IAM and S3 Tables through a running cluster's
|
||||
S3 and IAM APIs; see provider/README.md.
|
||||
test/
|
||||
local/ render a cluster with core and run it as real weed processes
|
||||
on 127.0.0.1 (no cloud, no docker), then assert it works
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SHELL := /bin/bash
|
||||
|
||||
.PHONY: fmt test test-race build docs check lint vuln hooks
|
||||
.PHONY: fmt test test-race build docs check lint vuln
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
@@ -25,7 +25,3 @@ lint:
|
||||
|
||||
vuln:
|
||||
govulncheck ./...
|
||||
|
||||
hooks:
|
||||
git config core.hooksPath .githooks
|
||||
pre-commit install --install-hooks --hook-dir .githooks
|
||||
@@ -4,6 +4,10 @@ Terraform and OpenTofu provider for SeaweedFS S3, IAM, and S3 Tables APIs. The
|
||||
provider targets SeaweedFS 4.51 API behavior and supports importing every
|
||||
managed resource; each resource's documentation lists its import identifier.
|
||||
|
||||
Originally written by Luís Costa as
|
||||
[terraform-provider-seaweedfs](https://github.com/luiscosta18/terraform-provider-seaweedfs)
|
||||
and licensed under the MIT license in [LICENSE](LICENSE).
|
||||
|
||||
## Managed resources
|
||||
|
||||
- **S3 buckets:** bucket lifecycle and tags, CORS, lifecycle rules, versioning,
|
||||
@@ -45,7 +49,7 @@ and configuration you intend to use before relying on IAM resources.
|
||||
## Build
|
||||
|
||||
```bash
|
||||
go mod tidy
|
||||
cd terraform/provider
|
||||
go build -o terraform-provider-seaweedfs
|
||||
```
|
||||
|
||||
@@ -99,16 +103,15 @@ resource "seaweedfs_iam_user" "example" {
|
||||
`true`/`false` and defaults to `false`. Explicit provider configuration takes
|
||||
precedence over environment variables.
|
||||
|
||||
## CI and Release
|
||||
## Tests
|
||||
|
||||
- CI: `.github/workflows/ci.yml` — runs on every push and pull request.
|
||||
- Release: `.github/workflows/release.yml` — runs on every push to `main`.
|
||||
Parses conventional commits since the last tag and creates a new `vMAJOR.MINOR.PATCH`
|
||||
tag and GitHub release automatically. No manual tagging required.
|
||||
`GITHUB_TOKEN` is provided automatically by GitHub Actions; no additional secrets are needed.
|
||||
- GoReleaser config: `.goreleaser.yml`
|
||||
- Install pre-commit and Conventional Commit hooks with `make hooks`
|
||||
(requires the `pre-commit` CLI).
|
||||
```sh
|
||||
make test-race
|
||||
make lint
|
||||
```
|
||||
|
||||
The `terraform: validate and test modules` workflow builds, vets and
|
||||
unit-tests this module on every change under `terraform/`.
|
||||
|
||||
## Local SeaweedFS integration smoke test
|
||||
|
||||
|
||||
Reference in new issue
Block a user