Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Error when applying a manifest with a key : {} #258

Open
gaurav517 opened this issue Jul 30, 2021 · 0 comments
Open

Error when applying a manifest with a key : {} #258

gaurav517 opened this issue Jul 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@gaurav517
Copy link

Terraform, Provider, Kubernetes versions

Terraform version:                                                                          
Terraform v1.0.3
on darwin_amd64

Provider version: 0.5.0

Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:52:14Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.9-gke.1900", GitCommit:"008fd38bf3dc201bebdd4fe26edf9bf87478309a", GitTreeState:"clean", BuildDate:"2021-04-14T09:22:08Z", GoVersion:"go1.15.8b5", Compiler:"gc", Platform:"linux/amd64"}

Terraform Configuration Files

resource "kubernetes_manifest" "cert_issuer_selfsigned" {
  provider   = "kubernetes-alpha"
  manifest   = {
    apiVersion = "cert-manager.io/v1"
    kind       = "ClusterIssuer"
    metadata   = {
      name = "selfsigned-cert-issuer"
    }
    spec       = {
      selfSigned = "{}"
    }
  }
}

Steps to Reproduce

terraform apply

Expected Behavior

kubernetes_manifest.cert_issuer_selfsigned should be applied.

Actual Behavior

Getting error:

│ Error: Failed to morph manifest to OAPI type
│ 
│   with kubernetes_manifest.cert_issuer_selfsigned,
│   on certs.tf line 29, in resource "kubernetes_manifest" "cert_issuer_selfsigned":
│   29: resource "kubernetes_manifest" "cert_issuer_selfsigned" {
│ 
│ AttributeName("spec"): [AttributeName("spec")] failed to morph object element into object element:
│ AttributeName("spec").AttributeName("selfSigned"): [AttributeName("spec").AttributeName("selfSigned")] failed to morph object element into object
│ element: AttributeName("spec").AttributeName("selfSigned"): [AttributeName("spec").AttributeName("selfSigned")] unsupported morph of string value
│ into type: tftypes.Object["crlDistributionPoints":tftypes.List[tftypes.String]]
╵

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
@gaurav517 gaurav517 added the bug Something isn't working label Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant