hashicorp / terraform-provider-vault

Terraform Vault provider
https://www.terraform.io/docs/providers/vault/
Mozilla Public License 2.0
468 stars 541 forks source link

[Bug]: resource vault_identity_oidc_provider doesn't support import #2302

Open shoeffner opened 3 months ago

shoeffner commented 3 months ago

Terraform Core Version

1.9.2

Terraform Vault Provider Version

3.23.0, 4.3.0

Vault Server Version

1.17.0

Affected Resource(s)

Expected Behavior

An import should work (see https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/identity_oidc_provider#import).

Actual Behavior

Planning failed. Terraform encountered an error while generating this plan.

╷ │ Error: resource vault_identity_oidc_provider doesn't support import │ │ ╵

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

terraform {
  backend "http" {}
  required_providers {
    vault = {
      source  = "hashicorp/vault"
      version = "4.3.0"
    }
  }
  required_version = ">= 1.5.7"
}

provider "vault" {
}

resource "vault_identity_oidc_provider" "default" {
  name = "default"
}

import {
  id = "default"
  to = vault_identity_oidc_provider.default
}

Steps to Reproduce

Debug Output

No response

Panic Output

No response

Important Factoids

No, nothing special. I just wanted to add some default scopes to the default OIDC provider, but cannot import it. As a workaround, I created an additional provider and use that.

References

Would you like to implement a fix?

No

HenriBlacksmith commented 3 weeks ago

I am facing the same bug using provider version 4.4.0