Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-hermann-sva authored Jan 27, 2024
1 parent ff29326 commit 7d0265a
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,85 @@ output "minio_user_secret" {
}
```

</details>

<details><summary>EXAMPLE #1: JUST CREATE USERS</summary>

```hcl
# CALL MODULE - main.tf
module "s3-minio-config" {
source = "github.com/stuttgart-things/s3-minio-config" # OR LOCAL E.G. "../s3-minio-config"
minio_user = var.minio_user
minio_server = var.minio_server
minio_password = var.minio_password
minio_region = var.minio_region
minio_ssl = true
users = var.users
}
variable "minio_region" {
description = "Default MINIO region"
default = "eu-central-1"
}
variable "minio_server" {
description = "Default MINIO host and port"
}
variable "minio_user" {
description = "MINIO user"
}
variable "minio_password" {
description = "MINIO password"
}
variable "users" {
type = list(object({
name = string
secret = string
policy = string
}))
default = []
description = "A list of new users"
}
output "user_minio_user" {
value = module.s3-minio-config.user_minio_user
}
output "minio_user_secret" {
value = module.s3-minio-config.minio_user_secret
}
output "minio_user_status" {
value = module.s3-minio-config.minio_user_status
}
```

```hcl
# VARIABLES -tfvars
minio_server = "artifacts.app.4sthings.tiab.ssc.sva.de:443"
users = [
{
name = "patrick"
secret = null # Randomly generated secret key
policy = null # No policy is attatched
},
{
name = "hermann"
secret = "thepassword"
policy = "readwrite"
}
]
minio_user = "<USER>"
minio_password = "<PASSWORD>"
```

</details>


<details><summary>EXECUTE TERRAFORM</summary>

```bash
Expand Down

0 comments on commit 7d0265a

Please sign in to comment.