Skip to content
Back to search

terraform-provider-minio

Terraform provider for MinIO and S3-compatible storage (R2, B2, Hetzner, Spaces) — buckets, IAM, replication, lifecycle, encryption & more.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/aminueza/terraform-provider-minio with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/aminueza/terraform-provider-minio'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/aminueza--terraform-provider-minio/badge.svg)](/listings/aminueza--terraform-provider-minio)

HTML

<a href="/listings/aminueza--terraform-provider-minio"><img src="/api/listings/aminueza--terraform-provider-minio/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Pin the provider and describe what you want. The example below creates a bucket, a user, a policy scoped to that bucket, and attaches the two:

terraform {
  required_providers {
    minio = {
      source  = "aminueza/minio"
      version = "~> 3.0"
    }
  }
}

provider "minio" {
  minio_server   = "localhost:9000"
  minio_user     = "minio"
  minio_password = "minio123"
}

resource "minio_s3_bucket" "app" {
  bucket = "app-data"
  acl    = "private"
}

resource "minio_iam_user" "app" {
  name = "app"
}

resource "minio_iam_policy" "app" {
  name   = "app-read-write"
  policy = <<-EOT
  {
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Action": ["s3:GetObject", "s3:PutObject"],
      "Resource": ["${minio_s3_bucket.app.arn}/*"]
    }]
  }
  EOT
}

resource "minio_iam_user_policy_attachment" "app" {
  user_name   = minio_iam_user.app.name
  policy_name = minio_iam_policy.app.name
}
terraform init
terraform apply

Credentials can also come from `MINIO_ENDPOINT`, `MINIO_USER`, and `MINIO_PASSWORD` instead of the `provider` block. See the [provider configuration](https://registry.terraform.io/providers/aminueza/minio/latest/docs) for every argument, and the [`examples`](./examples) directory for buckets, groups, service accounts, LDAP, and more.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 222 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <a href="https://registry.terraform.io/providers/aminueza/minio/latest">
  3. <img src=".github/assets/logo.png" alt="Terraform Provider for MinIO" width="180">
  4. </a>
  5. </p>
  6. <h1 align="center">Terraform Provider for MinIO</h1>
  7. <p align="center">
  8. Manage <a href="https://min.io">MinIO</a> and S3-compatible object storage as code
  9. </p>
  10. <p align="center">
  11. <a href="https://registry.terraform.io/providers/aminueza/minio/latest">
  12. <img alt="Terraform Registry" src="https://img.shields.io/badge/dynamic/json?query=%24.version&url=https%3A%2F%2Fregistry.terraform.io%2Fv1%2Fproviders%2Faminueza%2Fminio&label=registry&logo=terraform&color=7B42BC">
  13. </a>
  14. <a href="https://github.com/aminueza/terraform-provider-minio/actions/workflows/go.yml?query=branch%3Amain">
  15. <img alt="CI" src="https://img.shields.io/github/actions/workflow/status/aminueza/terraform-provider-minio/go.yml?branch=main&label=ci">
  16. </a>
  17. <a href="https://app.codecov.io/gh/aminueza/terraform-provider-minio/tree/main" >
  18. <img src="https://codecov.io/gh/aminueza/terraform-provider-minio/branch/main/graph/badge.svg?token=VwVse1EyIU"/>
  19. </a>
  20. <a href="go.mod">
  21. <img alt="Go version" src="https://img.shields.io/github/go-mod/go-version/aminueza/terraform-provider-minio">
  22. </a>
  23. <a href="LICENSE">
  24. <img alt="License" src="https://img.shields.io/badge/license-AGPL--3.0-blue">
  25. </a>
  26. </p>
  27. <p align="center">
  28. <a href="https://registry.terraform.io/providers/aminueza/minio/latest/docs"><b>Docs</b></a>
  29. &nbsp;·&nbsp;
  30. <a href="./examples"><b>Examples</b></a>
  31. &nbsp;·&nbsp;
  32. <a href="./.github/VISION.md"><b>Roadmap</b></a>
  33. &nbsp;·&nbsp;
  34. <a href="https://github.com/aminueza/terraform-provider-minio/discussions"><b>Discussions</b></a>
  35. &nbsp;·&nbsp;
  36. <a href="./.github/SECURITY.md"><b>Security</b></a>
  37. </p>
  38. ---
  39. Provision and manage [MinIO](https://min.io) with the same Terraform workflow you already use for the rest of your infrastructure. Define buckets, IAM users and policies, lifecycle and replication rules, encryption, and server configuration in HCL, then `plan` and `apply`. The provider talks to the MinIO S3 and Admin APIs directly and also drives other S3-compatible backends through a single compatibility switch.
  40. ## Highlights
  41. - **Broad coverage**: resources and data sources spanning buckets and objects, IAM, ILM, replication, encryption, notifications, and server and cluster configuration.
  42. - **Proven in production**: over 18 million downloads on the [Terraform Registry](https://registry.terraform.io/providers/aminueza/minio/latest), with frequent releases.
  43. - **Flexible auth**: static keys, environment variables, STS AssumeRole, OIDC web identity (passwordless CI/CD), and mTLS.
  44. - **Works beyond MinIO**: set `s3_compat_mode = true` to target Cloudflare R2, Backblaze B2, DigitalOcean Spaces, Hetzner Object Storage, and other S3-compatible stores. Continuous integration exercises MinIO and Garage; the other stores are reported by users (see [S3-compatible backends](#s3-compatible-backends)).
  45. - **Import everywhere**: every resource supports `terraform import`, so you can bring existing infrastructure under management.
  46. - **AI-agent ready**: ships a [Claude Code](https://docs.claude.com/en/docs/claude-code) skill and an [`AGENTS.md`](./AGENTS.md) so coding agents produce correct configuration out of the box.
  47. ## Quick start
  48. Pin the provider and describe what you want. The example below creates a bucket, a user, a policy scoped to that bucket, and attaches the two:
  49. ```hcl
  50. terraform {
  51. required_providers {
  52. minio = {
  53. source = "aminueza/minio"
  54. version = "~> 3.0"
  55. }
  56. }
  57. }
  58. provider "minio" {
  59. minio_server = "localhost:9000"
  60. minio_user = "minio"
  61. minio_password = "minio123"
  62. }
  63. resource "minio_s3_bucket" "app" {
  64. bucket = "app-data"
  65. acl = "private"
  66. }
  67. resource "minio_iam_user" "app" {
  68. name = "app"
  69. }
  70. resource "minio_iam_policy" "app" {
  71. name = "app-read-write"
  72. policy = <<-EOT
  73. {
  74. "Version": "2012-10-17",
  75. "Statement": [{
  76. "Effect": "Allow",
  77. "Action": ["s3:GetObject", "s3:PutObject"],
  78. "Resource": ["${minio_s3_bucket.app.arn}/*"]
  79. }]
  80. }
  81. EOT
  82. }
  83. resource "minio_iam_user_policy_attachment" "app" {
  84. user_name = minio_iam_user.app.name
  85. policy_name = minio_iam_policy.app.name
  86. }
  87. ```
  88. ```sh
  89. terraform init
  90. terraform apply
  91. ```
  92. Credentials can also come from `MINIO_ENDPOINT`, `MINIO_USER`, and `MINIO_PASSWORD` instead of the `provider` block. See the [provider configuration](https://registry.terraform.io/providers/aminueza/minio/latest/docs) for every argument, and the [`examples`](./examples) directory for buckets, groups, service accounts, LDAP, and more.
  93. ## What you can manage
  94. | Area | Resources include |
  95. |------|-------------------|
  96. | **Buckets & objects** | `s3_bucket`, `s3_object`, versioning, lifecycle, replication, CORS, quota, object lock, retention, tags, notifications, anonymous access |
  97. | **IAM** | users, groups, policies, service accounts, group and policy attachments, LDAP and OpenID identity providers |
  98. | **Encryption & KMS** | server-side encryption, `kms_key` |
  99. | **Lifecycle (ILM)** | `ilm_policy`, `ilm_tier` |
  100. | **Notifications & audit** | AMQP, Kafka, MQTT, MySQL, NATS, NSQ, Postgres, Redis, Elasticsearch, and webhook targets; audit and logger webhooks |
  101. | **Server & cluster** | API, region, scanner, storage class, and heal config; site replication; pool decommission and rebalance; batch jobs |
  102. Every area is mirrored by read-only data sources. Browse the full list in the [Terraform Registry documentation](https://registry.terraform.io/providers/aminueza/minio/latest/docs).
  103. ## S3-compatible backends
  104. The provider is built for MinIO but works with other S3-compatible stores. Set `s3_compat_mode = true` for a backend that does not implement every S3 feature. A read of a feature the backend does not implement then keeps the resource in state with the attributes the last write stored and logs a warning naming the feature. A create or an update of such a feature still fails, with an error that names the feature and the flag, because a policy or an encryption setting that is silently dropped is worse than an error:
  105. ```hcl
  106. provider "minio" {
  107. minio_server = "fsn1.your-objectstorage.com"
  108. minio_user = var.access_key
  109. minio_password = var.secret_key
  110. minio_ssl = true
  111. s3_compat_mode = true
  112. }
  113. ```
  114. Continuous integration runs the full acceptance suite against MinIO, and on every pull request it also runs the S3 subset of the suite against [Garage](https://garagehq.deuxfleurs.fr/) (the image pinned in [`docker-compose.multi-backend.yml`](./docker-compose.multi-backend.yml)), a non-MinIO S3 implementation. Which resources work on which backend is recorded in [`testdata/multi-backend/support.json`](./testdata/multi-backend/support.json), and that record decides what the Garage job runs and what it skips.
  115. Cloudflare R2, Backblaze B2, DigitalOcean Spaces, and Hetzner Object Storage have a scheduled workflow, `Hosted S3 Backends`, that runs the same S3 subset against each of them once a week when the repository holds credentials for that service; a service without credentials is skipped, so until they are configured these stores are reported by users and not exercised by continuous integration. Versity Gateway is reported by users only. The [provider docs](https://registry.terraform.io/providers/aminueza/minio/latest/docs) carry notes on region signing.
  116. ## Use with AI coding agents
  117. This repository ships a [Claude Code](https://docs.claude.com/en/docs/claude-code) skill in [`skills/terraform-minio`](./skills/terraform-minio) that turns natural-language requests (for example, *"give this app a read-only key for the backups bucket"*) into correct `aminueza/minio` HCL and drives Terraform through a safe **plan → confirm → apply** workflow. Read operations run freely; mutating operations are gated behind a reviewed plan and explicit confirmation.
  118. ```sh
  119. # Available in every project:
  120. cp -R skills/terraform-minio ~/.claude/skills/
  121. # Or scoped to this repo:
  122. mkdir -p .claude/skills && cp -R skills/terraform-minio .claude/skills/
  123. ```
  124. An [`AGENTS.md`](./AGENTS.md) at the repository root gives any agent the conventions, argument names, and error-handling patterns it needs to contribute here.
  125. ## Installing
  126. Released builds are published to the [Terraform Registry](https://registry.terraform.io/providers/aminueza/minio/latest); the `required_providers` block above is all you need. Prebuilt binaries are also on the [Releases page](https://github.com/aminueza/terraform-provider-minio/releases).
  127. To build and install from source, [install Task](https://taskfile.dev/docs/installation) and run:
  128. ```sh
  129. task install
  130. ```
  131. The plugin is placed in the correct local plugins directory for your operating system automatically.
  132. ## Development
  133. ```sh
  134. task build # compile the provider
  135. task lint # run golangci-lint
  136. task test # run acceptance tests (Docker required)
  137. task generate-docs # regenerate docs/ from templates/ and schema
  138. ```
  139. Acceptance tests run against real MinIO instances via Docker Compose:
  140. ```sh
  141. docker compose run --rm test
  142. # Run a subset by name:
  143. TEST_PATTERN=TestAccMinioS3Bucket_basic docker compose run --rm test
  144. # Build the MinIO servers from another release. This rebuilds the image for
  145. # every MinIO service at once:
  146. MINIO_VERSION=RELEASE.2025-10-15T17-29-55Z task test
  147. ```
  148. The MinIO servers and the `mc` client are built from source through the Go
  149. module proxy, in `testdata/minio/Dockerfile`. MinIO stopped serving its images
  150. to anonymous clients, first on Docker Hub and then on `quay.io`, and GitHub
  151. Actions runners are anonymous clients. `MINIO_VERSION` and `MC_VERSION` pick
  152. the release tags.
  153. Full setup, project layout, and the MinIO consoles used during testing are covered in [CONTRIBUTING.md](./.github/CONTRIBUTING.md).
  154. ## Community & support
  155. | What | Where |
  156. |--|--|
  157. | Documentation | [Terraform Registry](https://registry.terraform.io/providers/aminueza/minio/latest/docs) |
  158. | Issues | [Report a bug or request a feature](https://github.com/aminueza/terraform-provider-minio/issues) |
  159. | Discussions | [Ask questions and share ideas](https://github.com/aminueza/terraform-provider-minio/discussions) |
  160. | Security | [Report a vulnerability](./.github/SECURITY.md) |
  161. ## Contributing
  162. Contributions are welcome, from bug reports and feature requests to documentation and new resources. Start with [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for the development setup and conventions, and see [GOVERNANCE.md](./.github/GOVERNANCE.md) for how decisions are made.
  163. ## License
  164. Versions from v2.0.0 onward are distributed under the GNU AGPL-3.0 license. You are free to use, modify, and self-host the provider; if you distribute a modified version or offer it as a network service, you must make your source available under the same license.
  165. See [LICENSE](./LICENSE) for the full text.
  166. ## Acknowledgments
  167. - Every [contributor](https://github.com/aminueza/terraform-provider-minio/graphs/contributors) who has shaped this project.
  168. - Built with the [Terraform Plugin SDKv2](https://developer.hashicorp.com/terraform/plugin/sdkv2).
  169. - Powered by [MinIO](https://min.io) high-performance object storage.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.