GalleyBytes / terraform-operator

A Kubernetes CRD to handle terraform operations
http://tf.galleybytes.com
Apache License 2.0
357 stars 47 forks source link

Misspelling in terraformModule.configMapSeclector #153

Closed steakfest closed 10 months ago

steakfest commented 11 months ago

Was testing with using the "configMapSelector" which failed to work and I quickly realized that the word "Selector" in that CRD field name is misspelled (Seclector). Searched the issues for that string to see if this was already discussed.

For me the fix was to simply use the incorrect spelling for Selector in that key name, but might be a good thing to tidy up. Not sure what options are for backwards compatibility though since this is part of the CRD.

Would it be possible to have both keys work for specifying that data as a way of "fixing" it with backwards compatibility?

isaaguilar commented 11 months ago

Would it be possible to have both keys work for specifying that data as a way of "fixing" it with backwards compatibility?

How embarrassing 😬 I guess adding an alternative field with the correct spelling would be fine, with a notification that the incorrect field will be removed in the future.

davhdavh commented 10 months ago

It is not actually working in the first place :(

Nothing is mapped:

  terraformModule:
    configMapSeclector:
      name: terraform
      key: main.tf

Nothing is mapped:

  terraformModule:
    configMapSeclector:
      name: terraform

Error:

  terraformModule:
    configMapSelector:
      name: terraform
isaaguilar commented 10 months ago

Is the configmap in the same namespace as the tf-resource?

davhdavh commented 10 months ago

ofcourse. I solved my problem in a different way by inlining the files I needed in the tf file with the << operator

isaaguilar commented 10 months ago

https://github.com/GalleyBytes/terraform-operator/pull/161