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

Can't import kubernetes_node_taint resources #2094

Closed
partcyborg opened this issue May 8, 2023 · 1 comment · Fixed by #2098
Closed

Can't import kubernetes_node_taint resources #2094

partcyborg opened this issue May 8, 2023 · 1 comment · Fixed by #2098

Comments

@partcyborg
Copy link
Contributor

Terraform Version, Provider Version and Kubernetes Version

Terraform version: v1.3.9
Kubernetes provider version: v2.20.0

Affected Resource(s)

  • kubernetes_node_taint

Terraform Configuration Files

resource "kubernetes_node_taint" "test" {
  metadata {
    name = "ip-10-255-161-16.eu-west-1.compute.internal"
  }
  taint {
    key = "node-role.kubernetes.io/retired"
    value = "true"
    effect = "NoSchedule"
  }
  force = true
}

Steps to Reproduce

Attempt to import a pre-existing node taint

$ terraform import kubernetes_node_taint.test ip-10-255-161-16.eu-west-1.compute.internal,node-role.kubernetes.io/retired=true:NoSchedule

Expected Behavior

Resource should import

Actual Behavior

$ terraform import kubernetes_node_taint.test ip-10-255-161-16.eu-west-1.compute.internal,node-role.kubernetes.io/retired=true:NoSchedule
kubernetes_node_taint.test: Importing from ID "ip-10-255-161-16.eu-west-1.compute.internal,node-role.kubernetes.io/retired=true:NoSchedule"...
╷
│ Error: resource kubernetes_node_taint doesn't support import

Important Factoids

I submitted a PR to fix this some time ago but it has not been reviewed yet. If someone could review it I would appreciate it.

References

#2007

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@BBBmau
Copy link
Contributor

BBBmau commented May 10, 2023

Hello, thank you for opening this issue @partcyborg. We'll need to update the docs since the intended workflow would be what's discussed in other resources such as kubernetes_env which is found here since creating the resource is equivalent to importing.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants