Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minio #297

Merged
merged 9 commits into from
Oct 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Use [examples/main.tf](./examples/user/main.tf) to create some test config, such

```hcl
provider "minio" {
minio_server = "localhost:9000"
minio_region = "us-east-1"
minio_access_key = "minio"
minio_secret_key = "minio123"
minio_server = "localhost:9000"
minio_region = "us-east-1"
minio_user = "minio"
minio_password = "minio123"
}
```

Expand All @@ -91,17 +91,17 @@ variable "minio_region" {

variable "minio_server" {
description = "Default MINIO host and port"
default = "localhost:9000"
default = "localhost:9000"
}

variable "minio_access_key" {
variable "minio_user" {
description = "MINIO user"
default = "minio"
default = "minio"
}

variable "minio_secret_key" {
description = "MINIO secret user"
default = "minio123"
variable "minio_password" {
description = "MINIO password"
default = "minio123"
}
```

Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ tasks:
env:
TF_ACC: 0
MINIO_ENDPOINT: localhost:9000
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_USER: minio
MINIO_PASSWORD: minio123
MINIO_ENABLE_HTTPS: false
cmds:
- go test -v -cover ./minio
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: "3"
services:
minio:
image: docker.io/minio/minio:RELEASE.2022-03-26T06-49-28Z
image: docker.io/minio/minio:RELEASE.2022-10-21T22-37-48Z
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_CI_CD: '1'
MINIO_ROOT_USER: minio
felladrin marked this conversation as resolved.
Show resolved Hide resolved
MINIO_ROOT_PASSWORD: minio123
MINIO_CI_CD: "1"
command: server --console-address :9001 /data{0...3}
adminio-ui:
image: docker.io/rzrbld/adminio-ui:v1.93
Expand Down
28 changes: 14 additions & 14 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ This is a terraform provider plugin for managing [Minio](https://min.io/) S3 buc
```terraform
provider minio {
// required
minio_server = "..."
minio_access_key = "..."
minio_secret_key = "..."
minio_server = "..."
minio_user = "..."
minio_password = "..."

// optional
minio_session_token = "..."
Expand All @@ -35,27 +35,27 @@ authentication, in this order, and explained below:

### Static API Key

Static credentials can be provided by adding the `minio-server`, `minio_access_key` and `minio_secret_key` variables in-line in the
Static credentials can be provided by adding the `minio-server`, `minio_user` and `minio_password` variables in-line in the
Minio provider block:

Usage:

```hcl
provider "minio" {
minio_server = "..."
minio_access_key = "..."
minio_secret_key = "..."
minio_server = "..."
minio_user = "..."
minio_password = "..."
}
```

### Environment variables

You can provide your configuration via the environment variables representing your minio credentials:

```bash
```
export MINIO_ENDPOINT="http://myendpoint"
export MINIO_ACCESS_KEY="244tefewg"
export MINIO_SECRET_KEY="xgwgwqqwv"
export MINIO_ROOT_USER="244tefewg"
export MINIO_ROOT_PASSWORD="xgwgwqqwv"
```

When using this method, you may omit the
Expand All @@ -74,11 +74,11 @@ The following arguments are supported in the `provider` block:
- `minio_server` - (Required) Minio Host and Port. It must be provided, but
it can also be sourced from the `MINIO_ENDPOINT` environment variable

- `minio_access_key` - (Required) Minio Access Key. It must be provided, but
it can also be sourced from the `MINIO_ACCESS_KEY` environment variable
- `minio_user` - (Required) Minio User. It must be provided, but
it can also be sourced from the `MINIO_USER` environment variable

- `minio_secret_key` - (Required) Minio Secret Key. It must be provided, but
it can also be sourced from the `MINIO_SECRET_KEY` environment variable
- `minio_password` - (Required) Minio Password. It must be provided, but
it can also be sourced from the `MINIO_PASSWORD` environment variable

- `minio_session_token` - (Optional) Minio Session Token. It can also be sourced from
the `MINIO_SESSION_TOKEN` environment variable
Expand Down
10 changes: 3 additions & 7 deletions docs/resources/iam_service_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
page_title: "minio_iam_service_account Resource - terraform-provider-minio"
subcategory: ""
description: |-

---

# minio_iam_service_account (Resource)



## Example Usage

```terraform
Expand All @@ -25,17 +22,18 @@ resource "minio_iam_service_account" "test_service_account" {
target_user = minio_iam_user.test.name
}

output "minio_access_key" {
output "minio_user" {
value = minio_iam_service_account.test_service_account.access_key
}

output "minio_secret_key" {
output "minio_password" {
value = minio_iam_service_account.test_service_account.secret_key
sensitive = true
}
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand All @@ -53,5 +51,3 @@ output "minio_secret_key" {
- `id` (String) The ID of this resource.
- `secret_key` (String, Sensitive)
- `status` (String)


8 changes: 4 additions & 4 deletions examples/bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ terraform {
}

provider "minio" {
minio_server = var.minio_server
minio_region = var.minio_region
minio_access_key = var.minio_access_key
minio_secret_key = var.minio_secret_key
minio_server = var.minio_server
minio_region = var.minio_region
minio_user = var.minio_user
minio_password = var.minio_password
}

12 changes: 6 additions & 6 deletions examples/bucket/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ variable "minio_region" {

variable "minio_server" {
description = "Default MINIO host and port"
default = "localhost:9000"
default = "localhost:9000"
}

variable "minio_access_key" {
variable "minio_user" {
description = "MINIO user"
default = "minio"
default = "minio"
}

variable "minio_secret_key" {
description = "MINIO secret user"
default = "minio123"
variable "minio_password" {
description = "MINIO password"
default = "minio123"
}
8 changes: 4 additions & 4 deletions examples/group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ terraform {
}

provider "minio" {
minio_server = var.minio_server
minio_region = var.minio_region
minio_access_key = var.minio_access_key
minio_secret_key = var.minio_secret_key
minio_server = var.minio_server
minio_region = var.minio_region
minio_user = var.minio_user
minio_password = var.minio_password
}

10 changes: 5 additions & 5 deletions examples/group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ variable "minio_server" {
default = "localhost:9000"
}

variable "minio_access_key" {
variable "minio_user" {
description = "MINIO user"
default = "minio"
default = "minio"
}

variable "minio_secret_key" {
description = "MINIO secret user"
default = "minio123"
variable "minio_password" {
description = "MINIO password"
default = "minio123"
}
8 changes: 4 additions & 4 deletions examples/policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ terraform {
}

provider "minio" {
minio_server = var.minio_server
minio_region = var.minio_region
minio_access_key = var.minio_access_key
minio_secret_key = var.minio_secret_key
minio_server = var.minio_server
minio_region = var.minio_region
minio_user = var.minio_user
minio_password = var.minio_password
}

12 changes: 6 additions & 6 deletions examples/policy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ variable "minio_region" {

variable "minio_server" {
description = "Default MINIO host and port"
default = "localhost:9000"
default = "localhost:9000"
}

variable "minio_access_key" {
variable "minio_user" {
description = "MINIO user"
default = "minio"
default = "minio"
}

variable "minio_secret_key" {
description = "MINIO secret user"
default = "minio123"
variable "minio_password" {
description = "MINIO password"
default = "minio123"
}
6 changes: 3 additions & 3 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
provider minio {
// required
minio_server = "..."
minio_access_key = "..."
minio_secret_key = "..."
minio_server = "..."
minio_user = "..."
minio_password = "..."

// optional
minio_region = "..."
Expand Down
10 changes: 5 additions & 5 deletions examples/resources/minio_iam_service_account/resource.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "minio_iam_user" "test" {
name = "test"
force_destroy = true
tags = {
name = "test"
force_destroy = true
tags = {
tag-key = "tag-value"
}
}
Expand All @@ -10,11 +10,11 @@ resource "minio_iam_service_account" "test_service_account" {
target_user = minio_iam_user.test.name
}

output "minio_access_key" {
output "minio_user" {
value = minio_iam_service_account.test_service_account.access_key
}

output "minio_secret_key" {
output "minio_password" {
value = minio_iam_service_account.test_service_account.secret_key
sensitive = true
}
10 changes: 5 additions & 5 deletions examples/resources/minio_s3_object/main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
terraform {
required_providers {
minio = {
source = "aminueza/minio"
source = "aminueza/minio"
version = ">= 1.0.0"
}
}
required_version = ">= 0.13"
}

provider "minio" {
minio_server = var.minio_server
minio_region = var.minio_region
minio_access_key = var.minio_access_key
minio_secret_key = var.minio_secret_key
minio_server = var.minio_server
minio_region = var.minio_region
minio_user = var.minio_user
minio_password = var.minio_password
}

12 changes: 6 additions & 6 deletions examples/resources/minio_s3_object/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ variable "minio_region" {

variable "minio_server" {
description = "Default MINIO host and port"
default = "localhost:9000"
default = "localhost:9000"
}

variable "minio_access_key" {
variable "minio_user" {
description = "MINIO user"
default = "minio"
default = "minio"
}

variable "minio_secret_key" {
description = "MINIO secret user"
default = "minio123"
variable "minio_password" {
description = "MINIO password"
default = "minio123"
}
10 changes: 5 additions & 5 deletions examples/serviceaccount/main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
terraform {
required_providers {
minio = {
source = "aminueza/minio"
source = "aminueza/minio"
version = ">= 1.0.0"
}
}
required_version = ">= 0.13"
}

provider "minio" {
minio_server = var.minio_server
minio_region = var.minio_region
minio_access_key = var.minio_access_key
minio_secret_key = var.minio_secret_key
minio_server = var.minio_server
minio_region = var.minio_region
minio_user = var.minio_user
minio_password = var.minio_password
}

4 changes: 2 additions & 2 deletions examples/serviceaccount/output.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
output "minio_access_key" {
output "minio_user" {
value = minio_iam_service_account.test_service_account.access_key
}

output "minio_secret_key" {
output "minio_password" {
value = minio_iam_service_account.test_service_account.secret_key
sensitive = true
}
Loading