terraform-provider-kubernetes icon indicating copy to clipboard operation
terraform-provider-kubernetes copied to clipboard

Failure to parse manifest in `kubernetes_manifest` resource

Open jootten opened this issue 3 years ago • 6 comments

Hey, there seems to be an issue with lists in kubernetes_manifest.

Terraform Version, Provider Version and Kubernetes Version

Terraform version: 1.3.2
Kubernetes provider version: 1.14.0
Kubernetes version: 1.22.12

Affected Resource(s)

  • kubernetes_manifest

Terraform Configuration Files

resource gist

Debug Output

error gist

Steps to Reproduce

  1. terraform apply

Expected Behavior

Creation of daemonset as specified in the manifest.

Actual Behavior

Failure to parse the list of volumes under spec.template.spec.volumes with Error: Failed to transform List value into Tuple of different length.

Important Factoids

  • The resource is created without issues on Kubernetes provider version 2.7.1.
  • From version 2.8 to 2.12 a different error occurs: Error: Failed to morph manifest to OAPI type.
  • The manifest is taken without modifications from Google (here).

References

  • A similar issue has been described here.

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

jootten avatar Oct 10 '22 11:10 jootten

we're being affected by the same problem, any news about this issue?

@jootten did you managed to find a workaround for this issue?

Thank you!

iosifnicolae2 avatar Dec 22 '22 12:12 iosifnicolae2

Yes, we found that the existing resource could not be updated anymore after upgrading the Kubernetes provider. The solution for us was to destroy the resource with the old Kubernetes provider version and then recreate it after upgrading the Kubernetes version.

jootten avatar Dec 23 '22 16:12 jootten

I'm also facing this issue trying to apply a DataDog Agent (v2alpha1) custom resource manifest with volume configuration. As soon as the list of volumes has more than 1 element, this issue pops up.

In my case it doesn't matter if the resource already exists in the cluster or not, even creating it fails.

miguelaferreira avatar May 18 '23 10:05 miguelaferreira

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

github-actions[bot] avatar May 18 '24 00:05 github-actions[bot]

Trying to keep the issue open ...

miguelaferreira avatar May 22 '24 09:05 miguelaferreira

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

github-actions[bot] avatar May 23 '25 00:05 github-actions[bot]