Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Importing a user does not work #90

Closed
Nothing4You opened this issue Jan 7, 2021 · 1 comment
Closed

Importing a user does not work #90

Nothing4You opened this issue Jan 7, 2021 · 1 comment

Comments

@Nothing4You
Copy link
Contributor

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.

@Nothing4You
Copy link
Contributor Author

Also just tested this on the latest commit on master (gb8557a4) and the result is the same, except that it's now using minio api v3:
GET /minio/admin/v3/user-info?accessKey= HTTP/1.1

Nothing4You added a commit to Nothing4You/terraform-provider-minio that referenced this issue Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant