Skip to content

Commit

Permalink
KMS Keys and Bucket Server-Side-Encryption (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobikris committed Jul 12, 2023
1 parent a579cc4 commit 328699a
Show file tree
Hide file tree
Showing 25 changed files with 446 additions and 206 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks:
generate-docs:
desc: Generate the docs for the provider
cmds:
- go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
- go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest

install:
desc: Build and install the plugin in the correct folder (resolved automatically based on current Operating System).
Expand Down
38 changes: 22 additions & 16 deletions docs/data-sources/iam_policy_document.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
page_title: "minio_iam_policy_document Data Source - terraform-provider-minio"
subcategory: ""
description: |-
---

# minio_iam_policy_document (Data Source)



## Example Usage

```terraform
Expand Down Expand Up @@ -56,36 +59,39 @@ resource "minio_iam_policy" "test_policy" {
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- **id** (String) The ID of this resource.
- **override_json** (String)
- **policy_id** (String)
- **source_json** (String)
- **statement** (Block List) (see [below for nested schema](#nested-schema-for-statement))
- **version** (String)
- `override_json` (String)
- `policy_id` (String)
- `source_json` (String)
- `statement` (Block List) (see [below for nested schema](#nestedblock--statement))
- `version` (String)

### Read-Only

- **json** (String)
- `id` (String) The ID of this resource.
- `json` (String)

<a id="nestedblock--statement"></a>
### Nested Schema for `statement`

Optional:

- **actions** (Set of String)
- **condition** (Block Set) (see [below for nested schema](#nested-schema-for-statementcondition))
- **effect** (String)
- **principal** (String)
- **resources** (Set of String)
- **sid** (String)
- `actions` (Set of String)
- `condition` (Block Set) (see [below for nested schema](#nestedblock--statement--condition))
- `effect` (String)
- `principal` (String)
- `resources` (Set of String)
- `sid` (String)

<a id="nestedblock--statement--condition"></a>
### Nested Schema for `statement.condition`

Required:

- **test** (String)
- **values** (Set of String)
- **variable** (String)
- `test` (String)
- `values` (Set of String)
- `variable` (String)
42 changes: 17 additions & 25 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ provider minio {
minio_password = "..."
// optional
minio_session_token = "..."
minio_region = "..."
minio_api_version = "..."
minio_ssl = "..."
minio_insecure = "..."
minio_region = "..."
minio_api_version = "..."
minio_ssl = "..."
}
```

Expand All @@ -35,16 +33,16 @@ authentication, in this order, and explained below:

### Static API Key

Static credentials can be provided by adding the `minio_server`, `minio_user` and `minio_password` 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_user = "..."
minio_password = "..."
minio_server = "..."
minio_user = "..."
minio_password = "..."
}
```

Expand All @@ -53,9 +51,9 @@ provider "minio" {
You can provide your configuration via the environment variables representing your minio credentials:

```
export MINIO_ENDPOINT="http://myendpoint"
export MINIO_USER="244tefewg"
export MINIO_PASSWORD="xgwgwqqwv"
$ export MINIO_ENDPOINT="http://myendpoint"
$ export MINIO_USER="244tefewg"
$ export MINIO_PASSWORD="xgwgwqqwv"
```

When using this method, you may omit the
Expand All @@ -71,24 +69,18 @@ resource "minio_s3_bucket" "state_terraform_s3" {

The following arguments are supported in the `provider` block:

- `minio_server` - (Required) Minio Host and Port. It must be provided, but
* `minio_server` - (Required) Minio Host and Port. It must be provided, but
it can also be sourced from the `MINIO_ENDPOINT` environment variable

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

- `minio_password` - (Required) Minio Password. It must be provided, but
* `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

- `minio_region` - (Optional) Minio Region (`default: us-east-1`).

- `minio_api_version` - (Optional) Minio API Version (type: string, options: `v2` or `v4`, default: `v4`).
* `minio_region` - (Optional) Minio Region (`default: us-east-1`).

- `minio_ssl` - (Optional) Minio SSL enabled (default: `false`). It can also be sourced from the
`MINIO_ENABLE_HTTPS` environment variable
* `minio_api_version` - (Optional) Minio API Version (type: string, options: `v2` or `v4`, default: `v4`).

- `minio_insecure` - (Optional) Disable SSL certificate verification (default: `false`).
It can also be sourced from the `MINIO_INSECURE` environment variable.
* `minio_ssl` - (Optional) Minio SSL enabled (default: `false`). It can also be sourced from the
`MINIO_ENABLE_HTTPS` environment variable
12 changes: 5 additions & 7 deletions docs/resources/iam_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ output "minio_user_group" {

### Required

- **name** (String)
- `name` (String)

### Optional

- **disable_group** (Boolean) Disable group
- **force_destroy** (Boolean) Delete group even if it has non-Terraform-managed members
- **id** (String) The ID of this resource.
- `disable_group` (Boolean) Disable group
- `force_destroy` (Boolean) Delete group even if it has non-Terraform-managed members

### Read-Only

- **group_name** (String)


- `group_name` (String)
- `id` (String) The ID of this resource.
12 changes: 5 additions & 7 deletions docs/resources/iam_group_membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ description: |-

### Required

- **group** (String) Group name to add users
- **name** (String) Name of group membership
- **users** (Set of String) Add user or list of users such as a group membership

### Optional

- **id** (String) The ID of this resource.
- `group` (String) Group name to add users
- `name` (String) Name of group membership
- `users` (Set of String) Add user or list of users such as a group membership

### Read-Only

- `id` (String) The ID of this resource.
11 changes: 6 additions & 5 deletions docs/resources/iam_group_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ output "minio_group" {

### Required

- **group** (String)
- **policy** (String)
- `group` (String)
- `policy` (String)

### Optional

- **id** (String) The ID of this resource.
- **name** (String)
- **name_prefix** (String)
- `name` (String)
- `name_prefix` (String)

### Read-Only

- `id` (String) The ID of this resource.
2 changes: 0 additions & 2 deletions docs/resources/iam_group_policy_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ resource "minio_iam_group_policy_attachment" "developer" {
### Read-Only

- `id` (String) The ID of this resource.


10 changes: 4 additions & 6 deletions docs/resources/iam_group_user_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ output "minio_group" {

### Required

- **group_name** (String)
- **user_name** (String)

### Optional

- **id** (String) The ID of this resource.
- `group_name` (String)
- `user_name` (String)

### Read-Only

- `id` (String) The ID of this resource.
9 changes: 5 additions & 4 deletions docs/resources/iam_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ output "minio_policy" {

### Required

- **policy** (String)
- `policy` (String)

### Optional

- **id** (String) The ID of this resource.
- **name** (String)
- **name_prefix** (String)
- `name` (String)
- `name_prefix` (String)

### Read-Only

- `id` (String) The ID of this resource.
10 changes: 6 additions & 4 deletions docs/resources/iam_service_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
page_title: "minio_iam_service_account Resource - terraform-provider-minio"
subcategory: ""
description: |-
---

# minio_iam_service_account (Resource)



## Example Usage

```terraform
resource "minio_iam_user" "test" {
name = "test"
force_destroy = true
tags = {
name = "test"
force_destroy = true
tags = {
tag-key = "tag-value"
}
}
Expand All @@ -33,7 +36,6 @@ output "minio_password" {
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand Down
18 changes: 8 additions & 10 deletions docs/resources/iam_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,17 @@ output "secret" {

### Required

- **name** (String)
- `name` (String)

### Optional

- **disable_user** (Boolean) Disable user
- **force_destroy** (Boolean) Delete user even if it has non-Terraform-managed IAM access keys
- **id** (String) The ID of this resource.
- **secret** (String, Sensitive)
- **tags** (Map of String)
- **update_secret** (Boolean) Rotate Minio User Secret Key
- `disable_user` (Boolean) Disable user
- `force_destroy` (Boolean) Delete user even if it has non-Terraform-managed IAM access keys
- `secret` (String, Sensitive)
- `tags` (Map of String)
- `update_secret` (Boolean) Rotate Minio User Secret Key

### Read-Only

- **status** (String)


- `id` (String) The ID of this resource.
- `status` (String)
2 changes: 0 additions & 2 deletions docs/resources/iam_user_policy_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,3 @@ resource "minio_iam_user_policy_attachment" "developer" {
### Read-Only

- `id` (String) The ID of this resource.


28 changes: 11 additions & 17 deletions docs/resources/ilm_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,32 @@ resource "minio_ilm_policy" "bucket-lifecycle-rules" {
rule {
id = "expire-7d"
expiration = "7d"
filter = "prefix/"
tags = {
"app" = "myapp"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **bucket** (String)
- **rule** (Block List, Min: 1) (see [below for nested schema](#nested-schema-for-rule))
- `bucket` (String)
- `rule` (Block List, Min: 1) (see [below for nested schema](#nestedblock--rule))

### Optional
### Read-Only

- **id** (String) The ID of this resource.
- `id` (String) The ID of this resource.

<a id="nestedblock--rule"></a>
### Nested Schema for `rule`

Required:

- **id** (String) The ID of this resource.

Optional:

- **expiration** (String) The expiration as a duration (5d), date (1970-01-01), or "DeleteMarker"
- **filter** (String) Correspond to "prefix" value
- **tags** (Map of String) List of tags to use in filter
- `expiration` (String)
- `filter` (String)
- `tags` (Map of String)

Read-Only:

- **status** (String)
- `id` (String) The ID of this resource.
- `status` (String)

0 comments on commit 328699a

Please sign in to comment.