sl1pm4t / k2tf

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

k2tf produces invalid terraform resource names #103

Closed flokli closed 2 years ago

flokli commented 2 years ago

k2tf imports https://github.com/kubernetes-sigs/metrics-server/releases/193ce3be9d8b28c1863920258c4d1f4f1e656f25/download/components.yaml, but the generated terraform resources have invalid names.

╷
│ Error: Invalid resource name
│ 
│   on ../../../tf-modules/k8s-metrics-server/main.tf line 244, in resource "kubernetes_api_service" "v_1_beta_1_.metrics.k_8_s.io":
│  244: resource "kubernetes_api_service" "v_1_beta_1_.metrics.k_8_s.io" {
│ 
│ A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.
sl1pm4t commented 2 years ago

Hi @flokli - I think this is fixed in the latest release v0.7.0 - please give it a try.