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

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

Open
shoeffner opened this issue Jul 24, 2024 · 2 comments
Open

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

shoeffner opened this issue Jul 24, 2024 · 2 comments
Labels

Comments

@shoeffner
Copy link

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)

  • vault_identity_oidc_provider

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

  • Create main.tf with the content above, maybe adjust the provider configuration
  • Run terraform plan

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

@shoeffner shoeffner added the bug label Jul 24, 2024
@HenriBlacksmith
Copy link

I am facing the same bug using provider version 4.4.0

@vedevilolivedev
Copy link

#2227 has this labeled as documentation issue, however #1548 fixes this for scope. I have a local version I fiddled with based on the scope one that got provider and client working I can make a PR for. However, key handles the path differently.

The documentation still would need to be changed, they only work with the path (not the name as the documentation for all of them state), i.e. identity/oidc/client/whatever, but key simply takes the name (I could add that to the PR?) unless more significant changes are made that I'd need more time with before I felt ok submitting it.

This is version 4.5.0 I'm using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants