Skip to content

Unable to convert Yaml to terraform #42

@Prat0487

Description

@Prat0487

Hi everyone,
I am getting below error while converting YAML to terraform.
Below is my manifest file link

https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/release-1.3/deploy/kubernetes/base/kustomization.yaml

I am getting below error for above manifest

panic: value is null
goroutine 1 [running]:
runtime/debug.Stack(0xc0000a7940, 0x5d4fe0, 0x64b250)
/usr/lib/golang/src/runtime/debug/stack.go:24 +0x9f
main.capturePanic()
/home/ec2-user/environment/yamtotf/tfk8s/tfk8s.go:234 +0x73
panic(0x5d4fe0, 0x64b250)
/usr/lib/golang/src/runtime/panic.go:969 +0x1b9
github.com/zclconf/go-cty/cty.Value.LengthInt(0x0, 0x0, 0x0, 0x0, 0xc000018d01)
/home/ec2-user/go/pkg/mod/github.com/zclconf/[email protected]/cty/value_ops.go:1058 +0x277
github.com/zclconf/go-cty/cty.Value.AsValueMap(0x0, 0x0, 0x0, 0x0, 0x78d4c0)
/home/ec2-user/go/pkg/mod/github.com/zclconf/[email protected]/cty/value_ops.go:1315 +0x95
main.yamlToHCL(0x652140, 0xc0000d2350, 0x5ddaa0, 0xc000073aa0, 0x0, 0x0, 0x0, 0x0, 0x652140, 0xc0000d2350, ...)
/home/ec2-user/environment/yamtotf/tfk8s/tfk8s.go:111 +0x2ea
main.YAMLToTerraformResources(0x64ee20, 0xc000010698, 0x0, 0x0, 0xc000000000, 0x0, 0x0, 0xc000018a9b, 0xc00004bbe0)
/home/ec2-user/environment/yamtotf/tfk8s/tfk8s.go:209 +0x41d
main.main()
/home/ec2-user/environment/yamtotf/tfk8s/tfk8s.go:267 +0x3c5

Please someone who can help me on this or convert above Yaml file to terraform?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions