Can't convert
andir opened this issue · 1 comments
andir commented
I was trying to convert the metrics-server YAML (https://github.com/kubernetes-sigs/metrics-server/tree/v0.4.2) to terraform code. While doing so k2tf produced a valid looking TF file but produced one resource with an invalid resource name (resource "kubernetes_api_service" "v_1_beta_1__metrics_k_8_s.io" { … }
) due to it containing a .io
at the end of the name. The dot is apparently not permitted in TF resource names.
The YAMl (sub) document leading to this is this:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
labels:
k8s-app: metrics-server
name: v1beta1.metrics.k8s.io
spec:
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: metrics-server
namespace: kube-system
version: v1beta1
versionPriority: 100
Manually fixing the terraform resource name up did solve the issue but I think there is still a bug within k2tf somewhere.