sl1pm4t / k2tf

Kubernetes YAML to Terraform HCL converter
Mozilla Public License 2.0
1.18k stars 108 forks source link

stringData in a Kubernetes secret is not parsed #109

Closed danielsteman closed 4 months ago

danielsteman commented 1 year ago

I tried converting the following Kubernetes secret in yaml:

---
apiVersion: v1
kind: Secret
metadata:
  name: someSecretName
  namespace: someNamespace
type: Opaque
stringData:
  ACCOUNT: someAccount
  KEY: someKey

which is converted to:

resource "kubernetes_secret" "seldon_rclone_models_secret" {
  metadata {
    name      = "someSecretName"
    namespace = "someNamespace"
  }

  string_datum {}

  type = "Opaque"
}

It looks like stringData is not parsed. string_data is also not available in the Terraform api so it kinda makes sense. I'm still unsure to which argument it should map, since there is only data and binary_data as you can see here

sl1pm4t commented 4 months ago

I think this is resolved by the latest release (0.8.0) - please give it a try.