Code Monkey home page Code Monkey logo

terraform-provider-minio's People

Contributors

acolombier avatar adphi avatar allcontributors[bot] avatar aminueza avatar arataem avatar aslak11 avatar benosman avatar bujo avatar dependabot[bot] avatar eilyre avatar felladrin avatar ktaf avatar linyinfeng avatar michaelruigrok avatar ndejesus avatar nolte avatar nothing4you avatar pablo-ruth avatar particleflux avatar pjsier avatar renovate-bot avatar renovate[bot] avatar sdejong629 avatar stack72 avatar tmatilai avatar tobikris avatar tomasherout avatar y-yagi avatar yannicktekulve avatar yardenshoham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-minio's Issues

How to import resource

How can I find out an id which should be used to import minio user resource into state? mcli admin user info <target> <username> shows no useful output.

Thanks!

Changing a bucket attribure causes the bucket to be DELETED and re-CREATED

I am not sure if this is a limitation of terraform or an issue with the provider.

Changing an attribute of a minio_s3_bucket resource causes the bucket to be removed and recreated.

My Output from $ terraform Apply

$ terraform apply
minio_s3_bucket.general_buckets["raph"]: Refreshing state... [id=raph]
minio_s3_bucket.general_buckets["donnie"]: Refreshing state... [id=donnie]
minio_s3_bucket.general_buckets["mikey"]: Refreshing state... [id=mikey]
minio_s3_bucket.general_buckets["leo"]: Refreshing state... [id=leo]
minio_s3_bucket.general_buckets["splinter"]: Refreshing state... [id=splinter]
minio_s3_bucket.general_buckets["april"]: Refreshing state... [id=april]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # minio_s3_bucket.general_buckets["mikey"] must be replaced
-/+ resource "minio_s3_bucket" "general_buckets" {
      ~ acl                = "private" -> "public-read" # forces replacement
        bucket             = "mikey"
      ~ bucket_domain_name = "http://example.com:9000/minio/mikey" -> (known after apply)
        force_destroy      = false
      ~ id                 = "mikey" -> (known after apply)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Do you want to perform these actions in workspace "example.com"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: 

main.tf

variable "general_buckets" {
    type    = map 
    default = {
        "leo" = {
            "acl" = "public"
            "force_destroy" = false
        },
        "mikey" = {
            "acl" = "public-read"
            "force_destroy" = false
        },
        "donnie" = {
            "acl" = "private"
            "force_destroy" = false
        },
        "raph" = {
            "acl" = "private"
            "force_destroy" = false
        },
        "splinter" = {
            "acl" = "public"
            "force_destroy" = false
        },
        "april" = {
            "acl" = "private"
            "force_destroy" = false
        }        
    }
}

resource "minio_s3_bucket" "general_buckets" {
  for_each      = var.general_buckets
  bucket        = each.key
  acl           = each.value.acl
  force_destroy = each.value.force_destroy
}

output "general_buckets" {
  value = minio_s3_bucket.general_buckets
}

Add support full URL and https schema for minio_server

Thanks for the provider and your work!
Found some problem with the connection to minio via https schema

provider "minio" {
  minio_server     = "https://minio.example.com"
  minio_region     = "us-east-1"
  minio_access_key = "*REDACTED*"
  minio_secret_key = "*REDACTED*"
}

and output:

$ terraform apply

Error: Endpoint url cannot have fully qualified paths.

  on main.tf line 1, in provider "minio":
   1: provider "minio" {

Can you look at this? Thanks!

Cannot set custom secret to minio_iam_user

minio_iam_user secret is automatically generated. I want to keep same secret for Minio user between terraform apply -> terraform destroy -> terraform apply again.

Currently it is not possible due to Computed secret for the user. There should be a way to set custom secret to minio_iam_user. If custom secret not specified, then Computed secret should be generated for the user.

minio_iam_policy fails to update in place

I changed the policy, but minio_iam_policy fails to update it. Every terraform plan run shows the same in-place update to be performed, regardless of apply. Using terraform taint minio_iam_policy.foo to force a destroy+create made the changes take effect.

Add new resource minio_iam_user_group_membership

Add a new resource to attach a user to multiple groups. There is a similar resource created to attach multiple users to one group.

Some rules to follow:

  • add a new tag in provider.go: minio_iam_user_group_membership;

  • add an object in payload.go file:

type S3MinioIAMUserGroupMembershipConfig struct {
	MinioAdmin    *madmin.AdminClient
	MinioIAMName  string
	MinioIAMUsers string
	MinioIAMGroup []*string
}

Errors messages do not include full message from server.

I tried creating a used and just got:

Error: Failed to parse server response: invalid character 'P' looking for beginning of value.

This is not very helpful, it would be better if the complete response or at least the first e.g. 80 chars would be printed.
Maybe I used the wrong URL or my authentication was wrong (doesn't matter here, the issue is not abount my config mistake just about the error messsage.

I'm using aminueza/minio-1.2.0 with terraform 0.14.7


2021/03/10 14:57:39 [TRACE] GRPCProvider: PlanResourceChange
2021/03/10 14:57:39 [WARN] Provider "registry.terraform.io/aminueza/minio" produced an invalid plan for minio_iam_user.minio_user, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .update_secret: planned value cty.False does not match config value cty.NullVal(cty.Bool)
      - .disable_user: planned value cty.False does not match config value cty.NullVal(cty.Bool)
      - .force_destroy: planned value cty.False does not match config value cty.NullVal(cty.Bool)
2021/03/10 14:57:39 [TRACE] EvalCheckPlannedChange: Verifying that actual change (action Create) matches planned change (action Create)
2021/03/10 14:57:39 [TRACE] EvalReadState: reading state for minio_iam_user.minio_user
2021/03/10 14:57:39 [TRACE] EvalReadState: no state present for minio_iam_user.minio_user
minio_iam_user.minio_user: Creating...
2021/03/10 14:57:39 [DEBUG] EvalApply: ProviderMeta config value set
2021/03/10 14:57:39 [DEBUG] minio_iam_user.minio_user: applying the planned Create change
2021/03/10 14:57:39 [TRACE] GRPCProvider: ApplyResourceChange

2021/03/10 14:57:44 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "minio_iam_user.minio_user"
2021/03/10 14:57:44 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/aminueza/minio\"] (close)" is waiting for "minio_iam_user.minio_user"
2021/03/10 14:57:44 [TRACE] dag/walk: vertex "root" is waiting for "meta.count-boundary (EachMode fixup)"
2021/03/10 14:57:44 [DEBUG] minio_iam_user.minio_user: apply errored, but we're indicating that via the Error pointer rather than returning it: Failed to parse server response: invalid character 'P' looking for beginning of value.
2021/03/10 14:57:44 [TRACE] EvalMaybeTainted: minio_iam_user.minio_user encountered an error during creation, so it is now marked as tainted

Cannot create a S3 bucket using temporary credentials.

Hi,
I get the following error message when I attempt to create a S3 bucket using the terraform-provider-minio with temporary credentials (only able to set access key and secret key):
" ...
minio_s3_bucket.bucket: Creating...

  Error: [FATAL] Unable to check bucket (<bucketName>): The AWS Access Key Id you provided does not exist in our records."

Using the MinIO command-line 'mc' I can create/delete s3 buckets. However, I get the same error mentioned above when I
attempt to execute 'mc ls s3'. I got this command to work by setting the following environment variable:

 export MC_HOST_<alias>=https://<Access Key>:<Secret Key>:<Session Token>@<YOUR-S3-ENDPOINT>

Is there a way to set the Session Token in the terraform-provider-minio? If not, can it be added?

janicels

minio_iam_user Failed to parse server response

When trying to create an user in minio it seems the response is not what the provider expects. I could not see anything useful in the trace output, but will be happy to give what ever info will help on request.

Tested MinIO (docker hub) versions:

  • minio/minio:RELEASE.2020-02-27T00-23-05Z
  • minio/minio:RELEASE.2020-03-25T07-03-04Z

terraform version:

Terraform v0.12.24
+ provider.minio v1.1.0

minio.auto.tfvars:

minio_server     = "#REDACTED"
minio_access_key = "admin"
#minio_secret_key = "in password db or in secrets.auto.tfvars"

variables.tf:

variable "minio_region" {
  description = "MinIO region"
  type        = string
  default     = "eu-north-osl"
}

variable "minio_server" {
  description = "MinIO host and port"
  type        = string
}

variable "minio_access_key" {
  description = "MinIO access key used to bootstrap"
  type        = string
  default     = "admin"
}

variable "minio_secret_key" {
  description = "MinIO secret key used to bootstrap"
  type        = string
}

providers.tf:

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
}

user.tf:

resource "minio_iam_user" "bootstrap" {
  name = "bootstrap"
}

Output:

minio_s3_bucket.tfstate_bucket: Refreshing state... [id=tfstate-prod]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_iam_user.bootstrap will be created
  + resource "minio_iam_user" "bootstrap" {
      + disable_user  = false
      + force_destroy = false
      + id            = (known after apply)
      + name          = "bootstrap"
      + secret        = (known after apply)
      + status        = (known after apply)
      + update_secret = false
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_iam_user.bootstrap: Creating...
minio_iam_user.bootstrap: Still creating... [10s elapsed]
minio_iam_user.bootstrap: Still creating... [20s elapsed]
minio_iam_user.bootstrap: Still creating... [30s elapsed]
minio_iam_user.bootstrap: Still creating... [40s elapsed]
minio_iam_user.bootstrap: Still creating... [50s elapsed]
minio_iam_user.bootstrap: Still creating... [1m0s elapsed]
minio_iam_user.bootstrap: Still creating... [1m10s elapsed]

Error: Failed to parse server response.

  on user.tf line 1, in resource "minio_iam_user" "bootstrap":
   1: resource "minio_iam_user" "bootstrap" {

Add new terraform examples

Create files example in examples path:

  • Include input and output examples;
  • create a new folder to split buckets, users, groups and policies examples;
.
├── examples
│   ├── buckets
│   └── users

Can't create `minio_iam_user` in minio `RELEASE.2021-04-06T23-11-00Z` deployed on Kubernetes via minio-operator

Hello!
Thanks for awesome provider!

I have strange issue with creating new user in minio which deployed on Kubernetes:

minio_iam_user.backup: Creating...
╷
│ Error: Failed to parse server response: invalid character '<' looking for beginning of value.
│
│   with minio_iam_user.backup,
│   on infra.tf line 18, in resource "minio_iam_user" "backup":
│   18: resource "minio_iam_user" "backup" {
│
╵

Minio version: RELEASE.2021-04-06T23-11-00Z, Minio-operator version : 4.0.11, Terraform/provider version:

Terraform v0.15.3
on linux_amd64
+ provider registry.terraform.io/aminueza/minio v1.2.0

tf is very simple:

resource "minio_iam_user" "backup" {
  name = "backup"
}

How can I change user secret or rotate it in the right way?

  1. Create user - it's ok and secret generated
  2. Need change secret - what steps need?

If I set update_secret = true - secret not changed and user set in status disabled

Fields status and secret is computed and can'y be changed in direct way.

Add resource minio_s3_bucket_notification

Add a new resource to manage buckets notifications.

Some rules to follow:

  • add a new tag in provider.go: minio_s3_bucket_notification;

  • add an object in payload.go file named as
    type S3MinioNotification struct

  • create a func in check_config.go to fill up the object structure:
    func S3NotificationConfig

  • check terraform example;

  • check go code for AWS s3 notification;

  • add a test file naming as minio_s3_notification_test.go and follow the same template for test written in resource_aws_s3_notification_test.go;

  • update the documentation creating a new S3_BUCKET_NOTIFICATION.md file;

  • create a .tf file with an example in examples/bucket/bucket.tf;

minio_iam_policy order keeps shifting

I don't know if this problem originates from this code, or if minio itself keeps shuffling this (and the provider should just somehow cope with it), but I keep getting output like this from terraform plan:

  # module.a.minio_iam_policy.b has been changed
  ~ resource "minio_iam_policy" "b" {
        id     = "b"
        name   = "b"
      ~ policy = jsonencode(
          ~ {
              ~ Statement = [
                  ~ {
                      ~ Resource = [
                          - "arn:aws:s3:::x",
                            "arn:aws:s3:::y",
                            "arn:aws:s3:::z",
                          + "arn:aws:s3:::x",
                        ]
                        # (2 unchanged elements hidden)
                    },
                    {
                        Action   = [
                            "s3:GetObject",
                            "s3:PutObject",
                        ]
                        Effect   = "Allow"
                        Resource = [
                            "arn:aws:s3:::x/*",
                            "arn:aws:s3:::y/*",
                            "arn:aws:s3:::z/*",
                        ]
                    },
                ]
                # (1 unchanged element hidden)
            }
        )
    }
[...]
No changes. Your infrastructure matches the configuration.

Updating the *.tf to match the order here doesn't really matter; in a couple of runs, it'll show a different order.

All the lists seem to be getting shuffled, observing Resource, Action.

And in the end, terraform thinks that there are no changes to apply, so something seems to be doing an order-independent comparison, but the diffs are distractingly long.

Incompatible provider version on Mac M1/arm64

Hello,

I'm having issues running our Terraform workflow on my arm64 Macbook Pro M1.
I get the following error:

Error: Incompatible provider version

Provider registry.terraform.io/aminueza/minio v1.2.0 does not have a package available for your current platform, darwin_arm64.

Any plans to build binaries for this architecture?

Many thanks in advance

Importing a user does not work

terraform version

Terraform v0.14.4
+ provider registry.local/aminueza/minio v1.1.0

cat main.tf

resource "minio_iam_user" "foo" {
  name = "foo"
}

terraform import minio_iam_user.foo foo
GET /minio/admin/v2/user-info?accessKey= HTTP/2.0

minio_iam_user.foo: Importing from ID "foo"...
minio_iam_user.foo: Import prepared!
  Prepared minio_iam_user for import
minio_iam_user.foo: Refreshing state... [id=foo]

Error: Error reading IAM User foo: The specified user does not exist. (Specified user does not exist)
trace log
2021/01/07 19:20:31 [INFO] Terraform version: 0.14.4
2021/01/07 19:20:31 [INFO] Go runtime version: go1.15.6
2021/01/07 19:20:31 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "minio_iam_user.foo", "foo"}
2021/01/07 19:20:31 [DEBUG] Attempting to open CLI config file: /Users/user/.terraformrc
2021/01/07 19:20:31 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/01/07 19:20:31 [DEBUG] will search for provider plugins in terraform.d/plugins
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: terraform.d/plugins is a symlink to terraform.d/plugins
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: found registry.local/aminueza/minio v1.1.0 for darwin_amd64 at terraform.d/plugins/registry.local/aminueza/minio/1.1.0/darwin_amd64
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: found registry.local/aminueza/minio v1.1.0 for linux_amd64 at terraform.d/plugins/registry.local/aminueza/minio/1.1.0/linux_amd64
2021/01/07 19:20:31 [DEBUG] ignoring non-existing provider search directory /Users/user/.terraform.d/plugins
2021/01/07 19:20:31 [DEBUG] will search for provider plugins in /Users/user/Library/Application Support/io.terraform/plugins
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: /Users/user/Library/Application Support/io.terraform/plugins is a symlink to /Users/user/Library/Application Support/io.terraform/plugins
2021/01/07 19:20:31 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2021/01/07 19:20:31 [INFO] CLI command args: []string{"import", "minio_iam_user.foo", "foo"}
2021/01/07 19:20:31 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2021/01/07 19:20:31 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2021/01/07 19:20:31 [DEBUG] New state was assigned lineage "66d816ee-7557-8bc2-8dc0-f614670ffc7f"
2021/01/07 19:20:31 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2021/01/07 19:20:31 [TRACE] Meta.Backend: instantiated backend of type <nil>
2021/01/07 19:20:31 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers
2021/01/07 19:20:31 [TRACE] getproviders.SearchLocalDirectory: found registry.local/aminueza/minio v1.1.0 for darwin_amd64 at .terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64
2021/01/07 19:20:31 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64 as a candidate package for registry.local/aminueza/minio 1.1.0
2021/01/07 19:20:31 [DEBUG] checking for provisioner in "."
2021/01/07 19:20:31 [DEBUG] checking for provisioner in "/usr/local/bin"
2021/01/07 19:20:31 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2021/01/07 19:20:31 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2021/01/07 19:20:31 [TRACE] backend/local: requesting state manager for workspace "default"
2021/01/07 19:20:31 [TRACE] backend/local: state manager for workspace "default" will:
 - read initial snapshot from terraform.tfstate
 - write new snapshots to terraform.tfstate
 - create any backup at terraform.tfstate.backup
2021/01/07 19:20:31 [TRACE] backend/local: requesting state lock for workspace "default"
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: no previously-stored snapshot exists
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info
2021/01/07 19:20:31 [TRACE] backend/local: reading remote state for workspace "default"
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: read nil snapshot
2021/01/07 19:20:31 [DEBUG] backend/local: skipping refresh of managed resources
2021/01/07 19:20:31 [TRACE] backend/local: retrieving local state snapshot for workspace "default"
2021/01/07 19:20:31 [TRACE] backend/local: building context for current working directory
2021/01/07 19:20:31 [TRACE] terraform.NewContext: starting
2021/01/07 19:20:31 [TRACE] terraform.NewContext: loading provider schemas
2021/01/07 19:20:31 [TRACE] LoadSchemas: retrieving schema for provider type "registry.local/aminueza/minio"
2021-01-07T19:20:31.163+0100 [INFO]  plugin: configuring client automatic mTLS
2021-01-07T19:20:31.198+0100 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio args=[.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio]
2021-01-07T19:20:31.204+0100 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio pid=14669
2021-01-07T19:20:31.204+0100 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio
2021-01-07T19:20:31.222+0100 [INFO]  plugin.terraform-provider-minio: configuring server automatic mTLS: timestamp=2021-01-07T19:20:31.221+0100
2021-01-07T19:20:31.253+0100 [DEBUG] plugin: using plugin: version=5
2021-01-07T19:20:31.253+0100 [DEBUG] plugin.terraform-provider-minio: plugin address: address=/var/folders/gr/9lkgs1mx32s7wdg84c9hs4900000gp/T/plugin994104448 network=unix timestamp=2021-01-07T19:20:31.253+0100
2021/01/07 19:20:31 [TRACE] GRPCProvider: GetSchema
2021-01-07T19:20:31.318+0100 [TRACE] plugin.stdio: waiting for stdio data
2021-01-07T19:20:31.319+0100 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio"
2021/01/07 19:20:31 [TRACE] No provider meta schema returned
2021/01/07 19:20:31 [TRACE] GRPCProvider: Close
2021-01-07T19:20:31.324+0100 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio pid=14669
2021-01-07T19:20:31.324+0100 [DEBUG] plugin: plugin exited
2021/01/07 19:20:31 [TRACE] terraform.NewContext: complete
2021/01/07 19:20:31 [TRACE] backend/local: finished building terraform.Context
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.ConfigTransformer
2021/01/07 19:20:31 [TRACE] ConfigTransformer: Starting for path:
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.RootVariableTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.LocalTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.LocalTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.OutputTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2021/01/07 19:20:31 [TRACE] AttachResourceConfigTransformer: attaching to "minio_iam_user.foo" (*terraform.NodeAbstractResource) config from /Users/user/tf/minio/test/main.tf:24,1-32
2021/01/07 19:20:31 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to minio_iam_user.foo
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.ImportStateTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.ImportStateTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2021/01/07 19:20:31 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.local/aminueza/minio\"]" provider configuration from /Users/user/tf/minio/test/main.tf:16,1-17
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2021/01/07 19:20:31 [TRACE] ProviderTransformer: exact match for provider["registry.local/aminueza/minio"] serving minio_iam_user.foo (import id "foo")
2021/01/07 19:20:31 [DEBUG] ProviderTransformer: "minio_iam_user.foo (import id \"foo\")" (*terraform.graphNodeImportState) needs provider["registry.local/aminueza/minio"]
2021/01/07 19:20:31 [TRACE] ProviderTransformer: exact match for provider["registry.local/aminueza/minio"] serving minio_iam_user.foo
2021/01/07 19:20:31 [DEBUG] ProviderTransformer: "minio_iam_user.foo" (*terraform.NodeAbstractResource) needs provider["registry.local/aminueza/minio"]
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2021/01/07 19:20:31 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2021/01/07 19:20:31 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.local/aminueza/minio"]
2021/01/07 19:20:31 [TRACE] AttachSchemaTransformer: attaching resource schema to minio_iam_user.foo
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_server_persistent" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_secret_key_persistent" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_server_volatile" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_access_key_volatile" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_secret_key_volatile" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "minio_iam_user.foo (import id \"foo\")" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "minio_iam_user.foo" references: []
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "provider[\"registry.local/aminueza/minio\"]" references: [var.minio_secret_key_persistent var.minio_server_persistent var.minio_access_key_persistent]
2021/01/07 19:20:31 [DEBUG] ReferenceTransformer: "var.minio_access_key_persistent" references: []
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
    var.minio_access_key_persistent - *terraform.NodeRootVariable
    var.minio_secret_key_persistent - *terraform.NodeRootVariable
    var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.attachDataResourceDependenciesTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.attachDataResourceDependenciesTransformer (no changes)
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
    var.minio_access_key_persistent - *terraform.NodeRootVariable
    var.minio_secret_key_persistent - *terraform.NodeRootVariable
    var.minio_server_persistent - *terraform.NodeRootVariable
  provider["registry.local/aminueza/minio"] (close) - *terraform.graphNodeCloseProvider
    minio_iam_user.foo - *terraform.NodeAbstractResource
    minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
    var.minio_access_key_persistent - *terraform.NodeRootVariable
    var.minio_secret_key_persistent - *terraform.NodeRootVariable
    var.minio_server_persistent - *terraform.NodeRootVariable
  provider["registry.local/aminueza/minio"] (close) - *terraform.graphNodeCloseProvider
    minio_iam_user.foo - *terraform.NodeAbstractResource
    minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  root - *terraform.nodeCloseModule
    provider["registry.local/aminueza/minio"] (close) - *terraform.graphNodeCloseProvider
    var.minio_access_key_volatile - *terraform.NodeRootVariable
    var.minio_secret_key_volatile - *terraform.NodeRootVariable
    var.minio_server_volatile - *terraform.NodeRootVariable
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2021/01/07 19:20:31 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  minio_iam_user.foo - *terraform.NodeAbstractResource
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
    provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
  provider["registry.local/aminueza/minio"] - *terraform.NodeApplyableProvider
    var.minio_access_key_persistent - *terraform.NodeRootVariable
    var.minio_secret_key_persistent - *terraform.NodeRootVariable
    var.minio_server_persistent - *terraform.NodeRootVariable
  provider["registry.local/aminueza/minio"] (close) - *terraform.graphNodeCloseProvider
    minio_iam_user.foo - *terraform.NodeAbstractResource
    minio_iam_user.foo (import id "foo") - *terraform.graphNodeImportState
  root - *terraform.nodeCloseModule
    provider["registry.local/aminueza/minio"] (close) - *terraform.graphNodeCloseProvider
    var.minio_access_key_volatile - *terraform.NodeRootVariable
    var.minio_secret_key_volatile - *terraform.NodeRootVariable
    var.minio_server_volatile - *terraform.NodeRootVariable
  var.minio_access_key_persistent - *terraform.NodeRootVariable
  var.minio_access_key_volatile - *terraform.NodeRootVariable
  var.minio_secret_key_persistent - *terraform.NodeRootVariable
  var.minio_secret_key_volatile - *terraform.NodeRootVariable
  var.minio_server_persistent - *terraform.NodeRootVariable
  var.minio_server_volatile - *terraform.NodeRootVariable
  ------
2021/01/07 19:20:31 [DEBUG] Starting graph walk: walkImport
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_secret_key_persistent"
2021/01/07 19:20:31 [TRACE] vertex "var.minio_secret_key_persistent": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_server_persistent"
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_access_key_volatile"
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_secret_key_volatile"
2021/01/07 19:20:31 [TRACE] vertex "var.minio_secret_key_volatile": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] vertex "var.minio_access_key_volatile": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] vertex "var.minio_access_key_volatile": visit complete
2021/01/07 19:20:31 [TRACE] vertex "var.minio_server_persistent": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_access_key_persistent"
2021/01/07 19:20:31 [TRACE] vertex "var.minio_access_key_persistent": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] vertex "var.minio_server_persistent": visit complete
2021/01/07 19:20:31 [TRACE] vertex "var.minio_access_key_persistent": visit complete
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "var.minio_server_volatile"
2021/01/07 19:20:31 [TRACE] vertex "var.minio_secret_key_persistent": visit complete
2021/01/07 19:20:31 [TRACE] vertex "var.minio_server_volatile": starting visit (*terraform.NodeRootVariable)
2021/01/07 19:20:31 [TRACE] vertex "var.minio_server_volatile": visit complete
2021/01/07 19:20:31 [TRACE] vertex "var.minio_secret_key_volatile": visit complete
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "provider[\"registry.local/aminueza/minio\"]"
2021/01/07 19:20:31 [TRACE] vertex "provider[\"registry.local/aminueza/minio\"]": starting visit (*terraform.NodeApplyableProvider)
2021-01-07T19:20:31.326+0100 [INFO]  plugin: configuring client automatic mTLS
2021-01-07T19:20:31.359+0100 [DEBUG] plugin: starting plugin: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio args=[.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio]
2021-01-07T19:20:31.364+0100 [DEBUG] plugin: plugin started: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio pid=14670
2021-01-07T19:20:31.364+0100 [DEBUG] plugin: waiting for RPC address: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio
2021-01-07T19:20:31.383+0100 [INFO]  plugin.terraform-provider-minio: configuring server automatic mTLS: timestamp=2021-01-07T19:20:31.382+0100
2021-01-07T19:20:31.419+0100 [DEBUG] plugin.terraform-provider-minio: plugin address: network=unix address=/var/folders/gr/9lkgs1mx32s7wdg84c9hs4900000gp/T/plugin127276157 timestamp=2021-01-07T19:20:31.419+0100
2021-01-07T19:20:31.419+0100 [DEBUG] plugin: using plugin: version=5
2021/01/07 19:20:31 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.local/aminueza/minio\"]" provider for provider["registry.local/aminueza/minio"]
2021-01-07T19:20:31.498+0100 [TRACE] plugin.stdio: waiting for stdio data
2021/01/07 19:20:31 [TRACE] buildProviderConfig for provider["registry.local/aminueza/minio"]: using explicit config only
2021/01/07 19:20:31 [TRACE] GRPCProvider: GetSchema
2021-01-07T19:20:31.499+0100 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio"
2021/01/07 19:20:31 [TRACE] No provider meta schema returned
2021/01/07 19:20:31 [TRACE] GRPCProvider: Configure
2021-01-07T19:20:31.699+0100 [DEBUG] plugin.terraform-provider-minio: 2021/01/07 19:20:31 [DEBUG] S3 client initialized
2021/01/07 19:20:31 [TRACE] vertex "provider[\"registry.local/aminueza/minio\"]": visit complete
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "minio_iam_user.foo"
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo": starting visit (*terraform.NodeAbstractResource)
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo": visit complete
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "minio_iam_user.foo (import id \"foo\")"
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo (import id \"foo\")": starting visit (*terraform.graphNodeImportState)
2021/01/07 19:20:31 [TRACE] GRPCProvider: ImportResourceState
minio_iam_user.foo: Importing from ID "foo"...
2021/01/07 19:20:31 [TRACE] graphNodeImportState: import minio_iam_user.foo "foo" produced instance object of type minio_iam_user
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo (import id \"foo\")": expanding dynamic subgraph
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo (import id \"foo\")": entering dynamic subgraph
2021/01/07 19:20:31 [TRACE] dag/walk: visiting "import minio_iam_user.foo result"
2021/01/07 19:20:31 [TRACE] vertex "import minio_iam_user.foo result": starting visit (*terraform.graphNodeImportStateSub)
minio_iam_user.foo: Import prepared!
2021/01/07 19:20:31 [TRACE] GRPCProvider: ReadResource
  Prepared minio_iam_user for import
minio_iam_user.foo: Refreshing state... [id=foo]
2021/01/07 19:20:31 [TRACE] vertex "import minio_iam_user.foo result": visit complete
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo (import id \"foo\")": dynamic subgraph encountered errors
2021/01/07 19:20:31 [TRACE] vertex "minio_iam_user.foo (import id \"foo\")": visit complete
2021/01/07 19:20:31 [TRACE] dag/walk: upstream of "provider[\"registry.local/aminueza/minio\"] (close)" errored, so skipping
2021/01/07 19:20:31 [TRACE] dag/walk: upstream of "root" errored, so skipping

2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2021/01/07 19:20:31 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
Error: Error reading IAM User foo: The specified user does not exist. (Specified user does not exist)


2021-01-07T19:20:32.002+0100 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.local/aminueza/minio/1.1.0/darwin_amd64/terraform-provider-minio pid=14670
2021-01-07T19:20:32.002+0100 [DEBUG] plugin: plugin exited

mc admin user info 2 foo --json
GET /minio/admin/v3/user-info?accessKey=foo HTTP/1.1

{
 "status": "success",
 "accessKey": "foo",
 "userStatus": "enabled"
}

It looks like for some reason this provider is not passing the username to minio, the accessKey parameter in the HTTP request is empty.

Error: [FATAL] Unable to check bucket

Hi.
Thanks for your works.
have a bag.
details:

  • minio version RELEASE.2021-03-26T00-00-41Z
  • provider registry.terraform.io/aminueza/minio v1.2.0
  • Terraform v0.14.9 and try Terraform v0.13.6

Code:

provider "minio" {
  minio_server     = "minio.server:9000"
  minio_region     = "us-east-1"
  minio_access_key = "access_key"
  minio_secret_key = "secret_key"
}

resource "minio_s3_bucket" "testing" {
  bucket = "testing-bucket"
  acl    = "private"
}

output:

$ terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_s3_bucket.testing will be created
  + resource "minio_s3_bucket" "testing" {
      + acl                = "private"
      + bucket             = "testing-bucket"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_s3_bucket.testing: Creating...

Error: [FATAL] Unable to check bucket (testing-bucket): 400 Bad Request

  on main.tf line 30, in resource "minio_s3_bucket" "testing":
  30: resource "minio_s3_bucket" "testing" {

Dependabot can't parse your go.mod

Dependabot couldn't parse the go.mod found at /go.mod.

The error Dependabot encountered was:

go: finding cloud.google.com/go v0.45.1
go: finding cloud.google.com/go/bigquery v1.0.1
go: finding cloud.google.com/go/datastore v1.0.0
go: finding contrib.go.opencensus.io/exporter/ocagent v0.5.0
go: finding contrib.go.opencensus.io/exporter/stackdriver v0.0.0-20180919222851-d1e19f5c23e9
go: finding git.apache.org/thrift.git v0.12.0
go: finding github.com/Azure/azure-pipeline-go v0.2.1
go: finding github.com/Azure/azure-sdk-for-go v36.2.0+incompatible
go: finding github.com/Azure/azure-storage-blob-go v0.8.0
go: finding github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: finding github.com/Azure/go-autorest v11.7.0+incompatible
go: finding github.com/Azure/go-autorest/autorest v0.9.2
go: finding github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503
go: finding github.com/Azure/go-autorest/autorest/azure/cli v0.2.0
go: finding github.com/Azure/go-autorest/autorest/date v0.2.0
go: finding github.com/Azure/go-autorest/autorest/mocks v0.3.0
go: finding github.com/Azure/go-autorest/autorest/to v0.3.0
go: finding github.com/Azure/go-autorest/autorest/validation v0.2.0
go: finding github.com/Azure/go-autorest/logger v0.1.0
go: finding github.com/Azure/go-autorest/tracing v0.5.0
go: finding github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
go: finding github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022
go: finding github.com/DataDog/datadog-go v2.2.0+incompatible
go: finding github.com/DataDog/zstd v1.4.0
go: finding github.com/Jeffail/gabs v1.1.1
go: finding github.com/Microsoft/go-winio v0.4.12
go: finding github.com/NYTimes/gziphandler v1.1.1
go: finding github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5
go: finding github.com/SAP/go-hdb v0.14.0
go: finding github.com/SermoDigital/jose v0.9.1
go: finding github.com/Shopify/sarama v1.24.1
go: finding github.com/Shopify/toxiproxy v2.1.4+incompatible
go: finding github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
go: finding github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292
go: finding github.com/a8m/mark v0.1.1-0.20170507133748-44f2db618845
go: finding github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af
go: finding github.com/agext/levenshtein v1.2.2
go: finding github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6
go: finding github.com/alecthomas/participle v0.2.1
go: finding github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc
go: finding github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
go: finding github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a
go: finding github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5
go: finding github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible
go: finding github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239
go: finding github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e
go: finding github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0
go: finding github.com/apache/thrift v0.12.0
go: finding github.com/apparentlymart/go-cidr v1.0.1
go: finding github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0
go: finding github.com/apparentlymart/go-textseg v1.0.0
go: finding github.com/araddon/gou v0.0.0-20190110011759-c797efecbb61
go: finding github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2
go: finding github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878
go: finding github.com/armon/go-radix v1.0.0
go: finding github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
go: finding github.com/aws/aws-sdk-go v1.25.3
go: finding github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f
go: finding github.com/bcicen/jstream v0.0.0-20190220045926-16c1f8af81c2
go: finding github.com/beevik/ntp v0.2.0
go: finding github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973
go: finding github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: finding github.com/bgentry/speakeasy v0.1.0
go: finding github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932
go: finding github.com/blang/semver v3.5.1+incompatible
go: finding github.com/bmatcuk/doublestar v1.1.5
go: finding github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
go: finding github.com/boltdb/bolt v1.3.1
go: finding github.com/boombuler/barcode v1.0.0
go: finding github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625
go: finding github.com/briankassouf/jose v0.9.1
go: finding github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e
go: finding github.com/cenkalti/backoff v2.1.1+incompatible
go: finding github.com/census-instrumentation/opencensus-proto v0.2.0
go: finding github.com/centrify/cloud-golang-sdk v0.0.0-20190214225812-119110094d0f
go: finding github.com/cheggaaa/pb v1.0.28
go: finding github.com/chrismalek/oktasdk-go v0.0.0-20181212195951-3430665dfaa0
go: finding github.com/chzyer/logex v1.1.10
go: finding github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
go: finding github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1
go: finding github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible
go: finding github.com/circonus-labs/circonusllhist v0.1.3
go: finding github.com/client9/misspell v0.3.4
go: finding github.com/containerd/continuity v0.0.0-20181203112020-004b46473808
go: finding github.com/coredns/coredns v1.4.0
go: finding github.com/coreos/bbolt v1.3.3
go: finding github.com/coreos/etcd v3.3.12+incompatible
go: finding github.com/coreos/go-oidc v2.0.0+incompatible
go: finding github.com/coreos/go-semver v0.3.0
go: finding github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
go: finding github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
go: finding github.com/creack/pty v1.1.7
go: finding github.com/dancannon/gorethink v4.0.0+incompatible
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/denisenkom/go-mssqldb v0.0.0-20190315220205-a8ed825ac853
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding github.com/dimchansky/utfbom v1.1.0
go: finding github.com/djherbis/atime v1.0.0
go: finding github.com/dnaeon/go-vcr v1.0.1
go: finding github.com/docker/go-connections v0.4.0
go: finding github.com/docker/go-units v0.3.3
go: finding github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74
go: finding github.com/dustin/go-humanize v1.0.0
go: finding github.com/dylanmei/iso8601 v0.1.0
go: finding github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1
go: finding github.com/eapache/go-resiliency v1.2.0
go: finding github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21
go: finding github.com/eapache/queue v1.1.0
go: finding github.com/eclipse/paho.mqtt.golang v1.2.0
go: finding github.com/elazarl/go-bindata-assetfs v1.0.0
go: finding github.com/fatih/color v1.7.0
go: finding github.com/fatih/structs v1.1.0
go: finding github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: finding github.com/fortytw2/leaktest v1.3.0
go: finding github.com/frankban/quicktest v1.4.1
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/fullsailor/pkcs7 v0.0.0-20180613152042-8306686428a5
go: finding github.com/gammazero/deque v0.0.0-20190130191400-2afb3858e9c7
go: finding github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92
go: finding github.com/garyburd/redigo v1.6.0
go: finding github.com/gernest/wow v0.1.0
go: finding github.com/ghodss/yaml v1.0.0
go: finding github.com/gliderlabs/ssh v0.1.1
go: finding github.com/go-errors/errors v1.0.1
go: finding github.com/go-ini/ini v1.51.0
go: finding github.com/go-kit/kit v0.8.0
go: finding github.com/go-ldap/ldap v3.0.2+incompatible
go: finding github.com/go-logfmt/logfmt v0.3.0
go: finding github.com/go-ole/go-ole v1.2.4
go: finding github.com/go-sql-driver/mysql v1.4.1
go: finding github.com/go-stack/stack v1.8.0
go: finding github.com/go-stomp/stomp v2.0.2+incompatible
go: finding github.com/go-test/deep v1.0.3
go: finding github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4
go: finding github.com/gogo/protobuf v1.2.1
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
go: finding github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
go: finding github.com/golang/mock v1.3.1
go: finding github.com/golang/protobuf v1.3.2
go: finding github.com/golang/snappy v0.0.1
go: finding github.com/gomodule/redigo v2.0.0+incompatible
go: finding github.com/google/btree v1.0.0
go: finding github.com/google/go-cmp v0.3.1
go: finding github.com/google/go-github v17.0.0+incompatible
go: finding github.com/google/go-querystring v1.0.0
go: finding github.com/google/gofuzz v1.0.0
go: finding github.com/google/martian v2.1.0+incompatible
go: finding github.com/google/pprof v0.0.0-20190515194954-54271f7e092f
go: finding github.com/google/uuid v1.1.1
go: finding github.com/googleapis/gax-go v2.0.0+incompatible
go: finding github.com/googleapis/gax-go/v2 v2.0.5
go: finding github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968
go: finding github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01
go: finding github.com/gopherjs/gopherjs v0.0.0-20190328170749-bb2674552d8f
go: finding github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
go: finding github.com/gorilla/context v1.1.1
go: finding github.com/gorilla/handlers v1.4.0
go: finding github.com/gorilla/mux v1.7.0
go: finding github.com/gorilla/rpc v1.2.0+incompatible
go: finding github.com/gorilla/websocket v1.4.1
go: finding github.com/gotestyourself/gotestyourself v2.2.0+incompatible
go: finding github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
go: finding github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
go: finding github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: finding github.com/grpc-ecosystem/grpc-gateway v1.9.0
go: finding github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed
go: finding github.com/hashicorp/aws-sdk-go-base v0.4.0
go: finding github.com/hashicorp/consul v1.4.3
go: finding github.com/hashicorp/errwrap v1.0.0
go: finding github.com/hashicorp/go-azure-helpers v0.10.0
go: finding github.com/hashicorp/go-checkpoint v0.5.0
go: finding github.com/hashicorp/go-cleanhttp v0.5.1
go: finding github.com/hashicorp/go-gcp-common v0.0.0-20180425173946-763e39302965
go: finding github.com/hashicorp/go-getter v1.4.0
go: finding github.com/hashicorp/go-hclog v0.9.1
go: finding github.com/hashicorp/go-immutable-radix v1.0.0
go: finding github.com/hashicorp/go-memdb v0.0.0-20190306140544-eea0b16292ad
go: finding github.com/hashicorp/go-msgpack v0.5.5
go: finding github.com/hashicorp/go-multierror v1.0.0
go: finding github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26
go: finding github.com/hashicorp/go-retryablehttp v0.5.3
go: finding github.com/hashicorp/go-rootcerts v1.0.1
go: finding github.com/hashicorp/go-safetemp v1.0.0
go: finding github.com/hashicorp/go-slug v0.4.1
go: finding github.com/hashicorp/go-sockaddr v1.0.2
go: finding github.com/hashicorp/go-syslog v1.0.0
go: finding github.com/hashicorp/go-tfe v0.3.27
go: finding github.com/hashicorp/go-uuid v1.0.1
go: finding github.com/hashicorp/go-version v1.2.0
go: finding github.com/hashicorp/go.net v0.0.1
go: finding github.com/hashicorp/golang-lru v0.5.1
go: finding github.com/hashicorp/hcl v1.0.0
go: finding github.com/hashicorp/hcl/v2 v2.0.0
go: finding github.com/hashicorp/hcl2 v0.0.0-20190821123243-0c888d1241f6
go: finding github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590
go: finding github.com/hashicorp/logutils v1.0.0
go: finding github.com/hashicorp/mdns v1.0.0
go: finding github.com/hashicorp/memberlist v0.1.3
go: finding github.com/hashicorp/nomad v0.8.7
go: finding github.com/hashicorp/raft v1.1.0
go: finding github.com/hashicorp/serf v0.8.2
go: finding github.com/hashicorp/terraform v0.12.17
go: finding github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4
go: finding github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596
go: finding github.com/hashicorp/vault v1.1.0
go: finding github.com/hashicorp/vault-plugin-auth-alicloud v0.0.0-20190311155555-98628998247d
go: finding github.com/hashicorp/vault-plugin-auth-azure v0.0.0-20190201222632-0af1d040b5b3
go: finding github.com/hashicorp/vault-plugin-auth-centrify v0.0.0-20180816201131-66b0a34a58bf
go: finding github.com/hashicorp/vault-plugin-auth-gcp v0.0.0-20190201215414-7d4c2101e7d0
go: finding github.com/hashicorp/vault-plugin-auth-jwt v0.0.0-20190314211503-86b44673ce1e
go: finding github.com/hashicorp/vault-plugin-auth-kubernetes v0.0.0-20190201222209-db96aa4ab438
go: finding github.com/hashicorp/vault-plugin-secrets-ad v0.0.0-20190131222416-4796d9980125
go: finding github.com/hashicorp/vault-plugin-secrets-alicloud v0.0.0-20190131211812-b0abe36195cb
go: finding github.com/hashicorp/vault-plugin-secrets-azure v0.0.0-20181207232500-0087bdef705a
go: finding github.com/hashicorp/vault-plugin-secrets-gcp v0.0.0-20190311200649-621231cb86fe
go: finding github.com/hashicorp/vault-plugin-secrets-gcpkms v0.0.0-20190116164938-d6b25b0b4a39
go: finding github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20190315192709-dccffee64925
go: finding github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb
go: finding github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c
go: finding github.com/hpcloud/tail v1.0.0
go: finding github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
go: finding github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03
go: finding github.com/jeffchao/backoff v0.0.0-20140404060208-9d7fd7aa17f2
go: finding github.com/jefferai/jsonx v1.0.0
go: finding github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1
go: finding github.com/jen20/awspolicyequivalence v1.1.0
go: finding github.com/jessevdk/go-flags v1.4.0
go: finding github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/jonboulle/clockwork v0.1.0
go: finding github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926
go: finding github.com/json-iterator/go v1.1.7
go: finding github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024
go: finding github.com/jtolds/gls v4.20.0+incompatible
go: finding github.com/julienschmidt/httprouter v1.2.0
go: finding github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: finding github.com/keybase/go-crypto v0.0.0-20190312101036-b475f2ecc1fe
go: finding github.com/kisielk/errcheck v1.1.0
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/klauspost/compress v1.8.3
go: finding github.com/klauspost/cpuid v1.2.1
go: finding github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6
go: finding github.com/klauspost/pgzip v1.2.1
go: finding github.com/klauspost/readahead v1.3.1
go: finding github.com/klauspost/reedsolomon v1.9.3
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
go: finding github.com/kr/pretty v0.1.0
go: finding github.com/kr/pty v1.1.8
go: finding github.com/kr/text v0.1.0
go: finding github.com/kurin/blazer v0.5.4-0.20190613185654-cf2f27cc0be3
go: finding github.com/kylelemons/godebug v1.1.0
go: finding github.com/lib/pq v1.2.0
go: finding github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82
go: finding github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5
go: finding github.com/marstr/guid v1.1.0
go: finding github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9
go: finding github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b
go: finding github.com/mattbaird/elastigo v0.0.0-20170123220020-2fe47fd29e4b
go: finding github.com/mattn/go-colorable v0.1.1
go: finding github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb
go: finding github.com/mattn/go-isatty v0.0.7
go: finding github.com/mattn/go-runewidth v0.0.4
go: finding github.com/mattn/go-shellwords v1.0.4
go: finding github.com/matttproud/golang_protobuf_extensions v1.0.1
go: finding github.com/michaelklishin/rabbit-hole v1.5.0
go: finding github.com/miekg/dns v1.1.8
go: finding github.com/minio/blazer v0.0.0-20171126203752-2081f5bf0465
go: finding github.com/minio/cli v1.22.0
go: finding github.com/minio/dsync v1.0.0
go: finding github.com/minio/dsync/v2 v2.0.0
go: finding github.com/minio/gokrb5/v7 v7.2.5
go: finding github.com/minio/hdfs/v3 v3.0.1
go: finding github.com/minio/highwayhash v1.0.0
go: finding github.com/minio/lsync v1.0.1
go: finding github.com/minio/mc v0.0.0-20191012041914-735aa139b19c
go: finding github.com/minio/minio v0.0.0-20191209145531-bf3a97d3aae3
go: finding github.com/minio/minio-go v6.0.14+incompatible
go: finding github.com/minio/minio-go/v6 v6.0.44
go: finding github.com/minio/parquet-go v0.0.0-20190318185229-9d767baf1679
go: finding github.com/minio/sha256-simd v0.1.1
go: finding github.com/minio/sio v0.2.0
go: finding github.com/mitchellh/cli v1.0.0
go: finding github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
go: finding github.com/mitchellh/copystructure v1.0.0
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb
go: finding github.com/mitchellh/go-testing-interface v1.0.0
go: finding github.com/mitchellh/go-wordwrap v1.0.0
go: finding github.com/mitchellh/gox v0.4.0
go: finding github.com/mitchellh/hashstructure v1.0.0
go: finding github.com/mitchellh/iochan v1.0.0
go: finding github.com/mitchellh/mapstructure v1.1.2
go: finding github.com/mitchellh/panicwrap v1.0.0
go: finding github.com/mitchellh/pointerstructure v0.0.0-20170205204203-f2329fcfa9e2
go: finding github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51
go: finding github.com/mitchellh/reflectwalk v1.0.0
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd
go: finding github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223
go: finding github.com/nats-io/gnatsd v1.4.1
go: finding github.com/nats-io/go-nats v1.7.2
go: finding github.com/nats-io/go-nats-streaming v0.4.4
go: finding github.com/nats-io/jwt v0.3.2
go: finding github.com/nats-io/nats v1.7.2
go: finding github.com/nats-io/nats-server v1.4.1
go: finding github.com/nats-io/nats-server/v2 v2.1.2
go: finding github.com/nats-io/nats-streaming-server v0.14.2
go: finding github.com/nats-io/nats.go v1.9.1
go: finding github.com/nats-io/nkeys v0.1.3
go: finding github.com/nats-io/nuid v1.0.1
go: finding github.com/nats-io/stan.go v0.4.5
go: finding github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d
go: finding github.com/ncw/directio v1.0.5
go: finding github.com/nsqio/go-nsq v1.0.7
go: finding github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
go: finding github.com/oklog/run v1.0.0
go: finding github.com/onsi/ginkgo v1.11.0
go: finding github.com/onsi/gomega v1.8.1
go: finding github.com/opencontainers/go-digest v1.0.0-rc1
go: finding github.com/opencontainers/image-spec v1.0.1
go: finding github.com/opencontainers/runc v0.1.1
go: finding github.com/opentracing/opentracing-go v1.0.2
go: finding github.com/openzipkin/zipkin-go v0.1.6
go: finding github.com/ory-am/common v0.4.0
go: finding github.com/ory/dockertest v3.3.4+incompatible
go: finding github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58
go: finding github.com/pascaldekloe/goe v0.1.0
go: finding github.com/patrickmn/go-cache v2.1.0+incompatible
go: finding github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117
go: finding github.com/pborman/uuid v1.2.0
go: finding github.com/pierrec/lz4 v2.2.6+incompatible
go: finding github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
go: finding github.com/pkg/errors v0.8.1
go: finding github.com/pkg/profile v1.3.0
go: finding github.com/pkg/xattr v0.4.1
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/posener/complete v1.2.2-0.20190702141536-6ffe496ea953
go: finding github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35
go: finding github.com/pquerna/otp v1.1.0
go: finding github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
go: finding github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
go: finding github.com/prometheus/common v0.2.0
go: finding github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1
go: finding github.com/rcrowley/go-metrics v0.0.0-20190704165056-9c2d0518ed81
go: finding github.com/rjeczalik/notify v0.9.2
go: finding github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
go: finding github.com/rs/cors v1.6.0
go: finding github.com/ryanuber/columnize v2.1.0+incompatible
go: finding github.com/ryanuber/go-glob v1.0.0
go: finding github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec
go: finding github.com/satori/go.uuid v1.2.0
go: finding github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
go: finding github.com/secure-io/sio-go v0.3.0
go: finding github.com/securego/gosec v0.0.0-20200116080623-3d5c97b418f4
go: finding github.com/segmentio/go-prompt v1.2.1-0.20161017233205-f0d19b6901ad
go: finding github.com/sergi/go-diff v1.0.0
go: finding github.com/shirou/gopsutil v2.18.12+incompatible
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/skyrings/skyring-common v0.0.0-20160929130248-d1c0bb1cbd5e
go: finding github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3
go: finding github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
go: finding github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a
go: finding github.com/soheilhy/cmux v0.1.4
go: finding github.com/spf13/afero v1.2.1
go: finding github.com/spf13/pflag v1.0.3
go: finding github.com/streadway/amqp v0.0.0-20190402114354-16ed540749f6
go: finding github.com/stretchr/objx v0.2.0
go: finding github.com/stretchr/testify v1.4.0
go: finding github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d
go: finding github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
go: finding github.com/terraform-providers/terraform-provider-openstack v1.15.0
go: finding github.com/tidwall/gjson v1.2.1
go: finding github.com/tidwall/match v1.0.1
go: finding github.com/tidwall/pretty v1.0.0
go: finding github.com/tidwall/sjson v1.0.4
go: finding github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5
go: finding github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926
go: finding github.com/ugorji/go v1.1.5-pre
go: finding github.com/ugorji/go/codec v1.1.5-pre
go: finding github.com/ulikunitz/xz v0.5.5
go: finding github.com/valyala/fastjson v1.4.1
go: finding github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a
go: finding github.com/vmihailenco/msgpack v4.0.1+incompatible
go: finding github.com/xanzy/ssh-agent v0.2.1
go: finding github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
go: finding github.com/xdg/stringprep v1.0.0
go: finding github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: finding github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
go: finding github.com/zclconf/go-cty v1.1.0
go: finding github.com/zclconf/go-cty-yaml v1.0.1
go: finding go.etcd.io/bbolt v1.3.3
go: finding go.opencensus.io v0.22.0
go: finding go.uber.org/atomic v1.3.2
go: finding go.uber.org/multierr v1.1.0
go: finding go.uber.org/zap v1.10.0
go: finding go4.org v0.0.0-20180809161055-417644f6feb5
go: finding golang.org/x/build v0.0.0-20190314133821-5284462c4bec
go: finding golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: finding golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522
go: finding golang.org/x/image v0.0.0-20190227222117-0694c2d4d067
go: finding golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f
go: finding golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6
go: finding golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee
go: finding golang.org/x/net v0.0.0-20191009170851-d66e71096ffb
go: finding golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
go: finding golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852
go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: finding golang.org/x/sys v0.0.0-20190922100055-0a153f010e69
go: finding golang.org/x/text v0.3.2
go: finding golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
go: finding golang.org/x/tools v0.0.0-20200103221440-774c71fcf114
go: finding golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
go: finding google.golang.org/api v0.9.0
go: finding google.golang.org/appengine v1.6.1
go: finding google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: finding google.golang.org/grpc v1.21.1
go: finding gopkg.in/Shopify/sarama.v1 v1.20.0
go: finding gopkg.in/VividCortex/ewma.v1 v1.1.1
go: finding gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: finding gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d
go: finding gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
go: finding gopkg.in/cheggaaa/pb.v1 v1.0.28
go: finding gopkg.in/cheggaaa/pb.v2 v2.0.6
go: finding gopkg.in/fatih/color.v1 v1.7.0
go: finding gopkg.in/fatih/pool.v2 v2.0.0
go: finding gopkg.in/fsnotify.v1 v1.4.7
go: finding gopkg.in/gorethink/gorethink.v4 v4.1.0
go: finding gopkg.in/h2non/filetype.v1 v1.0.5
go: finding gopkg.in/inf.v0 v0.9.1
go: finding gopkg.in/ini.v1 v1.48.0
go: finding gopkg.in/jcmturner/aescts.v1 v1.0.1
go: finding gopkg.in/jcmturner/dnsutils.v1 v1.0.1
go: finding gopkg.in/jcmturner/goidentity.v2 v2.0.0
go: finding gopkg.in/jcmturner/goidentity.v3 v3.0.0
go: finding gopkg.in/jcmturner/gokrb5.v5 v5.3.0
go: finding gopkg.in/jcmturner/gokrb5.v7 v7.2.3
go: finding gopkg.in/jcmturner/rpc.v0 v0.0.2
go: finding gopkg.in/jcmturner/rpc.v1 v1.1.0
go: finding gopkg.in/ldap.v3 v3.0.3
go: finding gopkg.in/mattn/go-colorable.v0 v0.1.0
go: finding gopkg.in/mattn/go-isatty.v0 v0.0.4
go: finding gopkg.in/mattn/go-runewidth.v0 v0.0.4
go: finding gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce
go: finding gopkg.in/olivere/elastic.v5 v5.0.80
go: finding gopkg.in/ory-am/dockertest.v2 v2.2.3
go: finding gopkg.in/resty.v1 v1.12.0
go: finding gopkg.in/square/go-jose.v2 v2.3.0
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: finding gopkg.in/urfave/cli.v1 v1.20.0
go: finding gopkg.in/yaml.v2 v2.2.7
go: finding gotest.tools v2.2.0+incompatible
go: finding grpc.go4.org v0.0.0-20170609214715-11d0a25b4919
go: finding honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a
go: finding howett.net/plist v0.0.0-20181124034731-591f970eefbb
go: finding k8s.io/api v0.0.0-20190313115550-3c12c96769cc
go: finding k8s.io/apimachinery v0.0.0-20190313115320-c9defaaddf6f
go: finding k8s.io/klog v0.2.0
go: finding layeh.com/radius v0.0.0-20190118135028-0f678f039617
go: finding rsc.io/binaryregexp v0.2.0
go: finding sigs.k8s.io/yaml v1.1.0
go list -m: github.com/gorilla/[email protected]+incompatible: invalid version: +incompatible suffix not allowed: major version v1 is compatible

View the update logs.

This 'admin' API is not supported by server in 'mode-server-fs'

When I try to create a new user using this provider, I get the following error:

│ Error: This 'admin' API is not supported by server in 'mode-server-fs'
│ 
│   with minio_iam_user.testuser,
│   on minio.tf line 29, in resource "minio_iam_user" "testuser":
│   29: resource "minio_iam_user" "testuser" {

I understand that some features are not available when using mode-server-fs. However, I have no problem creating users via the commandline using mc admin user ....

So what am I missing?

Add resource minio_s3_bucket_file

Add a new resource to manage buckets file objects.

Some rules to follow:

  • add a new tag in provider.go: minio_s3_bucket_file;

  • add an object in payload.go file named as
    type S3MinioFile struct

  • create a func in check_config.go to fill up the object structure:
    func S3FileConfig

  • add a test file naming as minio_s3_bucket_file_test.go;

  • update the documentation creating a new S3_BUCKET_FILE.md file;

  • create a .tf file with an example in examples/bucket/bucket.tf;

[bug] newer server and client

Hi there! Thanks for the great implementation!

Small problem using it tho and I suspect to do with the client. afaik am running close to the latest version of minio:?

Error: Unexpected client 'admin' API version found 'v2', expected 'v3', please downgrade the client to older releases

  on users.tf line 13, in resource "minio_iam_user" "name_here":
  13: resource "minio_iam_user" "namehere" {
mc -v
mc version RELEASE.2020-07-17T02-52-20Z

(⎈ |N/A:N/A)[8:53:44] :minio-s3 git:(master*) $ mc admin info *****

●  assets***********
   Uptime: 6 days
   Version: 2020-07-22T00:26:33Z
   Network: 1/1 OK

Importing a bucket does not import ACL, forces bucket replacement

terraform version

Terraform v0.14.4
+ provider registry.local/aminueza/minio v1.1.0

cat main.tf

resource "minio_s3_bucket" "foo" {
  bucket = "foo"
  acl    = "private"
}

terraform plan

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_s3_bucket.foo will be created
  + resource "minio_s3_bucket" "foo" {
      + acl                = "private"
      + bucket             = "foo"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

terraform import minio_s3_bucket.foo foo

minio_s3_bucket.foo: Importing from ID "foo"...
minio_s3_bucket.foo: Import prepared!
  Prepared minio_s3_bucket for import
minio_s3_bucket.foo: Refreshing state... [id=foo]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

terraform plan

minio_s3_bucket.foo: Refreshing state... [id=foo]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # minio_s3_bucket.foo must be replaced
-/+ resource "minio_s3_bucket" "foo" {
      + acl                = "private" # forces replacement
      ~ bucket_domain_name = "https://minio.mydomain.tld/minio/foo" -> (known after apply)
      + force_destroy      = false
      ~ id                 = "foo" -> (known after apply)
        # (1 unchanged attribute hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Creating `minio_iam_user` runs into timeouts

Hello,

first of all big thanks for your effort in writing a MinIO provider, this will possibly ease the very painful task of managing multiple environments with many user/bucket combinations.

Versions used

Terraform / MinIO provider

Terraform v0.14.0
+ provider registry.terraform.io/aminueza/minio v1.2.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

MinIO version (distributed 4-node cluster)

2021-03-26T00:00:41Z

Problem faced

When creating users via your plugin, terraform never gets out of the "creating..." state and eventually runs into a timeout.

Code used & intention

I've written the following code to create many users in a batch and manage them as a list of users:

resource "minio_iam_user" "user" {
  for_each      = toset(var.user)
  name          = each.value
  force_destroy = false
  update_secret = true
  disable_user  = false
}

output "user_secret" {
  value = {
      for user in minio_iam_user.user:
      user.name => user.secret
  }
}

While var.user is a simple list(string) of users (but I've also tried your basic example from the repo, which also didn't work for me).

Debug output

For security/compliance reasons of my company, I need to blur some of the debug output but that shouldn't matter. I'll gladly provide it later if you cannot reproduce the error.

Add new resource minio_s3_object

Add a new resource to manage buckets objects.

Some rules to follow:

  • add a new tag in provider.go: minio_s3_object;

  • add an object in payload.go file named as
    type S3MinioObject struct

  • create a func in check_config.go to fill up the object structure:
    func S3ObjectConfig

  • check terraform example;

  • check go code for AWS s3 object;

  • add a test file naming as minio_s3_object_test.go and follow the same template for test written in resource_aws_s3_object_test.go;

  • update the documentation creating a new S3_BUCKET_OBJECT.md file;

  • create a .tf file with an example in examples/bucket/bucket.tf;

Creating a new bucket with invalid ACL results in a broken state

Hi,

let's say I tried to create a bucket like this:

resource "minio_s3_bucket" "testbucket" {
  bucket = "testbucket"
  acl    = "readonly"
}

As I took the acl name from minio docs and not from this provider docs the creation fails, I should have used public-read instead.

The result looks like this:

terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_s3_bucket.testbucket will be created
  + resource "minio_s3_bucket" "testbucket" {
      + acl                = "readonly"
      + bucket             = "testbucket"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_s3_bucket.testbucket: Creating...

Error: [FATAL] [ACL] Unable to create bucket (testbucket): [FATAL] Unsuported ACL (readonly): (valid acl: private, public-write, public-read, public-read-write, public)

  on main.tf line 52, in resource "minio_s3_bucket" "testbucket":
  52: resource "minio_s3_bucket" "testbucket" {

At this stage I'm expecting no bucket to be created as the creation task failed.
If in the background first the bucket is created and then the ACL is applied I would alternatively expect that the bucket creation was added to tfstate but the ACL would be incorrect.

After this failed apply I'm trying to fix my deployment by updating the acl:

resource "minio_s3_bucket" "testbucket" {
  bucket   = "testbucket"
  acl      = "public-read"
}

Trying to apply this time shows that the bucket has already been created but isn't in tfstate:

terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # minio_s3_bucket.testbucket will be created
  + resource "minio_s3_bucket" "testbucket" {
      + acl                = "public-read"
      + bucket             = "testbucket"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

minio_s3_bucket.testbucket: Creating...

Error: [FATAL] Bucket already exists! (testbucket): %!s(<nil>)

  on main.tf line 52, in resource "minio_s3_bucket" "testbucket":
  52: resource "minio_s3_bucket" "testbucket" {

terraform version

Terraform v0.14.8
+ provider registry.terraform.io/aminueza/minio v1.2.0

Add suport to CA certificates

Improve TLS support as described in #58 :

Awesome, it works! Thanks, @aminueza!
And I would ask you please little improvements regarding TLS for a future if it is possible. Can you add parameters to configure CA certificates ca_cert_file (for self-signed certificates) and client - certificates, and key cert_file, key_file (for certificate-based authorization)? How it implemented in many Terraform providers for example in a Vault - https://www.terraform.io/docs/providers/vault/index.html
Maybe it needs a separate issue?

Originally posted by @binlab in #58 (comment)

Fix user permissions

There is an error in resource_minio_iam.go regarding policy error.

backtrace:

2020/01/17 00:13:48 [INFO] backend/local: applycalling Apply
2020/01/17 00:13:48 [INFO] terraform: building graph: GraphTypeApply
2020/01/17 00:13:48 [DEBUG] ProviderTransformer: "minio_bucket.state_terraform_s3 (prepare state)" (*terraform.NodeApplyableResource) needs provider.minio
2020/01/17 00:13:48 [DEBUG] ProviderTransformer: "minio_iam_user.maria" (*terraform.NodeApplyableResourceInstance) needs provider.minio
2020/01/17 00:13:48 [TRACE] ProviderTransformer: exact match for provider.minio serving minio_iam_user.maria (prepare state)
2020/01/17 00:13:48 [DEBUG] ProviderTransformer: "minio_iam_user.maria (prepare state)" (*terraform.NodeApplyableResource) needs provider.minio
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "minio_iam_user.maria (prepare state)" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "var.minio_server" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "var.minio_access_key" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "output.secret" references: [minio_iam_user.maria (prepare state) minio_iam_user.maria minio_iam_user.maria]
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "provider.minio" references: [var.minio_access_key var.minio_region var.minio_secret_key var.minio_server]
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "minio_bucket.state_terraform_s3 (prepare state)" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "minio_iam_user.maria" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "var.minio_secret_key" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "var.minio_region" references: []
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "output.user_maria" references: [minio_iam_user.maria (prepare state) minio_iam_user.maria minio_iam_user.maria]
2020/01/17 00:13:48 [DEBUG] ReferenceTransformer: "output.status" references: [minio_iam_user.maria (prepare state) minio_iam_user.maria minio_iam_user.maria]
2020-01-17T00:13:48.263+0200 [INFO]  plugin: configuring client automatic mTLS
2020-01-17T00:13:48.295+0200 [DEBUG] plugin: starting plugin: path=/Users/amanda/.terraform.d/plugins/darwin_amd64/terraform-provider-minio_v1.0 args=[/Users/amanda/.terraform.d/plugins/darwin_amd64/terraform-provider-minio_v1.0]
2020-01-17T00:13:48.299+0200 [DEBUG] plugin: plugin started: path=/Users/amanda/.terraform.d/plugins/darwin_amd64/terraform-provider-minio_v1.0pid=7659
2020-01-17T00:13:48.299+0200 [DEBUG] plugin: waiting for RPC address: path=/Users/amanda/.terraform.d/plugins/darwin_amd64/terraform-provider-minio_v1.0
2020-01-17T00:13:48.312+0200 [INFO]  plugin.terraform-provider-minio_v1.0: configuring server automatic mTLS: timestamp=2020-01-17T00:13:48.312+0200
2020-01-17T00:13:48.338+0200 [DEBUG] plugin: using plugin: version=5
2020-01-17T00:13:48.338+0200 [DEBUG] plugin.terraform-provider-minio_v1.0: plugin address: address=/var/folders/p0/bp935s4x40bcd1ww2gc990d40000gn/T/plugin497947886 network=unix timestamp=2020-01-17T00:13:48.338+0200
2020/01/17 00:13:48 [WARN] Provider "minio" produced an invalid plan for minio_iam_user.maria, but we are tolerating it because it is using thelegacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .update_secret: planned value cty.Falsedoes not match config value cty.NullVal(cty.Bool)
      - .disable_user: planned value cty.False does not match config value cty.NullVal(cty.Bool)
      - .force_destroy: planned value cty.Falsedoes not match config value cty.NullVal(cty.Bool)
minio_iam_user.maria: Creating...
2020/01/17 00:13:48 [DEBUG] minio_iam_user.maria: applying the planned Create change
2020/01/17 00:13:48 [TRACE] GRPCProvider: ApplyResourceChange
2020/01/17 00:13:48 [DEBUG] minio_iam_user.maria: apply errored, but we're indicating that via the Error pointer rather than returning it: Failed to parse server response.
2020/01/17 00:13:48 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020/01/17 00:13:48 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: Failed to parse serverresponse.
2020/01/17 00:13:48 [ERROR] <root>: eval: *terraform.EvalSequence, err: Failed to parse server response.
2020/01/17 00:13:48 [TRACE] [walkApply] Exitingeval tree: minio_iam_user.maria

Error: Failed to parse server response.

  on bucket.tf line 6, in resource "minio_iam_user" "maria":
   6: resource "minio_iam_user" "maria" {


2020-01-17T00:13:48.470+0200 [DEBUG] plugin: plugin process exited: path=/Users/amanda/.terraform.d/plugins/darwin_amd64/terraform-provider-minio_v1.0 pid=7659
2020-01-17T00:13:48.470+0200 [DEBUG] plugin: plugin exited

minio_iam_policy does not output error information

When trying to create a minio_iam_policy with invalid values the only error that is output is:

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.

Enabling TF_LOG=DEBUG I was able to find the error: 2021/06/11 14:33:54 invalid resource 'production'. This should have been included in the error output.

Error FATAL Unable to check bucket

Thanks for your works on this provider.
I have a bug with the new version of this provider, please find the details below:

  • Server side: minio version 2020-12-03T05:49:24Z deployed with helm chart minio 8.0.9
  • terraform provider version 1.2.0
  • terraform version 0.14.5
  • Code
terraform {
  required_version = ">= 0.14.0"

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

provider "minio" {
  minio_server     = "myminio:443/"
  minio_region     = "us-east-1"
  minio_access_key = "my_access_key"
  minio_secret_key = "my_secret_key"
}

resource "minio_s3_bucket" "cats" {
  bucket = "dev-cats"
  acl    = "private"
}

and the output of terraform apply

Terraform will perform the following actions:

  # minio_s3_bucket.cats will be created
  + resource "minio_s3_bucket" "cats" {
      + acl                = "private"
      + bucket             = "dev-cats"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes
...
2021-01-26T12:57:39.908-0500 [DEBUG] plugin.terraform-provider-minio_v1.2.0: plugin address: address=/tmp/user/1001/plugin294304924 network=unix timestamp=2021-01-26T12:57:39.908-0500
2021/01/26 12:57:40 [WARN] Provider "registry.terraform.io/aminueza/minio" produced an invalid plan for minio_s3_bucket.cats, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .force_destroy: planned value cty.False does not match config value cty.NullVal(cty.Bool)
minio_s3_bucket.cats: Creating...
2021/01/26 12:57:40 [DEBUG] EvalApply: ProviderMeta config value set
2021/01/26 12:57:40 [DEBUG] minio_s3_bucket.cats: applying the planned Create change
2021-01-26T12:57:40.005-0500 [DEBUG] plugin.terraform-provider-minio_v1.2.0: 2021/01/26 12:57:40 [DEBUG] Creating bucket: [dev-cats] in region: [us-east-1]
2021/01/26 12:57:40 [DEBUG] minio_s3_bucket.cats: apply errored, but we're indicating that via the Error pointer rather than returning it: [FATAL] Unable to check bucket (dev-cats): 400 Bad Request

Error: [FATAL] Unable to check bucket (dev-cats): 400 Bad Request

  on main.tf line 19, in resource "minio_s3_bucket" "cats":
  19: resource "minio_s3_bucket" "cats" {


2021-01-26T12:57:40.054-0500 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-01-26T12:57:40.057-0500 [DEBUG] plugin: plugin process exited: path=.terraform/providers/registry.terraform.io/aminueza/minio/1.2.0/linux_amd64/terraform-provider-minio_v1.2.0 pid=3833
2021-01-26T12:57:40.057-0500 [DEBUG] plugin: plugin exited

Creating `minio_s3_bucket` with `for_each` results in strange `bucket_domain_name`

Hello,

when I create buckets with a for_each directive, the resulting persisted state of terraform looks really strange.

Let's say I have a list(string) of n buckets and create them with this resource definition:

resource "minio_s3_bucket" "buckets" {
  for_each = toset(var.buckets)
  bucket   = each.value
  acl      = "private"
}

Then the persisted state results in something like this:

[torben@CONCEALED] ~/git/ [CONCEALED]
└─ $ ▶ tf state show minio_s3_bucket.buckets[\"bucket1\"]
# minio_s3_bucket.buckets["bucket1"]:
resource "minio_s3_bucket" "buckets" {
    acl                = "private"
    bucket             = "bucket1"
    bucket_domain_name = "https://my.fqdn.pointing.to.my.minio.cluster.com/bucket23/?location=/minio/bucket1"
    force_destroy      = false
    id                 = "bucket1"
}

where the bucket_domain_name seems to be misconfigured.

Imposible to create Condition with colon in key (s3:authType)

Hi, I try to limit pre-signed URL. I have .tf for this:

resource "minio_iam_policy" "minio_im_policy-ban-pre-signed-URLs" {
    name                        = "s3policy-ban-pre-signed-URLs"
    policy                      = data.minio_iam_policy-ban-pre-signed-URLs-doc.json
}

data "minio_iam_policy_document" "minio_iam_policy-ban-pre-signed-URLs-doc" {
    statement {
        sid                     = "Block query string authentication"
        effect                  = "Deny"
        principal               = "*"
        action                  = "s3:GetObject*"
        resource                = "arn:aws:s3:::*"
        condition {
            StringEquals {
                "s3:authType"   = "REST-QUERY-STRING"
            }
        }
    }
}

Unfortunately it is impossible to terraform plan\apply because of colon in s3:authType. Error text:

19:                 s3:authType   = "REST-QUERY-STRING"

An argument or block definition is required here. To set an argument, use the
equals sign "=" to introduce the argument value.

or if I add quotes:

  19:                 "s3:authType"   = "REST-QUERY-STRING"

Argument names must not be quoted.

So, is it possible to use Terraform for such s3 policy, or maybe you know any workaround?

terraform -v
Terraform v0.13.7

  • provider registry.terraform.io/aminueza/minio v1.2.0

similar issue with terraform-provider-aws

I can't change an existing policy.

Hi. When I try to change the existing policy then get this message.
The policy doesn't change.
I'm using aminueza/terraform-provider-minio build from the last commit b2774a1 with terraform v0.12.28

2021-04-06T18:10:18.127+0300 [DEBUG] plugin: plugin started: path=/home/rustam/.terraform.d/plugins/linux_amd64/terraform-provider-minio pid=510429
2021-04-06T18:10:18.127+0300 [DEBUG] plugin: waiting for RPC address: path=/home/rustam/.terraform.d/plugins/linux_amd64/terraform-provider-minio
2021-04-06T18:10:18.137+0300 [INFO]  plugin.terraform-provider-minio: configuring server automatic mTLS: timestamp=2021-04-06T18:10:18.137+0300
2021-04-06T18:10:18.166+0300 [DEBUG] plugin.terraform-provider-minio: plugin address: address=/tmp/plugin542964280 network=unix timestamp=2021-04-06T18:10:18.166+0300
2021-04-06T18:10:18.166+0300 [DEBUG] plugin: using plugin: version=5
minio_iam_policy.policy_ro: Modifying... [id=devops_policy_ro]
2021/04/06 18:10:18 [DEBUG] minio_iam_policy.policy_ro: applying the planned Update change
2021-04-06T18:10:18.227+0300 [INFO]  plugin.terraform-provider-minio: 2021/04/06 18:10:18 [DEBUG] Getting IAM Policy: devops_policy_ro: timestamp=2021-04-06T18:10:18.227+0300
2021-04-06T18:10:18.228+0300 [INFO]  plugin.terraform-provider-minio: 2021/04/06 18:10:18 [WARN] (&{ 2012-10-17 [{ListAllBucket Allow [s3:PutObject] [arn:aws:s3:::devops/*] []}]}): timestamp=2021-04-06T18:10:18.228+0300
2021/04/06 18:10:18 [WARN] Provider "registry.terraform.io/-/minio" produced an unexpected new value for minio_iam_policy.policy_ro, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .policy: was cty.StringVal("{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"ListAllBucket\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:*\"\n            ],\n            \"Principal\": \"*\",\n            \"Resource\": \"arn:aws:s3:::devops/*\"\n        }\n    ]\n}\n"), but now cty.StringVal("{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"ListAllBucket\",\"Effect\":\"Allow\",\"Action\":[\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::devops/*\"]}]}")
minio_iam_policy.policy_ro: Modifications complete after 0s [id=devops_policy_ro]
2021-04-06T18:10:18.265+0300 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-04-06T18:10:18.267+0300 [DEBUG] plugin: plugin process exited: path=/home/rustam/.terraform.d/plugins/linux_amd64/terraform-provider-minio pid=510429
2021-04-06T18:10:18.267+0300 [DEBUG] plugin: plugin exited

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Add resource minio_s3_bucket_policy

Add a new resource to manage buckets policies.

Some rules to follow:

  • add a new tag in provider.go: minio_s3_bucket_policy;

  • add an object in payload.go file named as
    type S3MinioPolicy struct

  • create a func in check_config.go to fill up the object structure:
    func S3PolicyConfig

  • check terraform example;

  • check go code for AWS s3 policy;

  • add a test file naming as minio_s3_policy_test.go and follow the same template for test written in resource_aws_s3_policy_test.go;

  • update the documentation creating a new S3_BUCKET_POLICY.md file;

  • create a .tf file with an example in examples/bucket/bucket.tf;

Confused identity in go.mod

The github repo is github.com/aminueza/terraform-provider-minio
but go.mod says github.com/aminueza/terraform-minio-provider
(

module github.com/aminueza/terraform-minio-provider
)

It seems like go.mod should be updated to match the github repo and what terraform expects of plugin naming.

minio_s3_bucket_lifecycle

Hi,
maybe i'm wrong but i did'nt found any way to manage bucket's lifecycle. I think it will be a good improvement because today, i'm forced to couple your provider with aws to handle the lifecycle.

thank you in advance !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.