Aller au contenu

Terraform code#

Rancher configurations are all using the same modules to interact with rancher. One of them, the rancher2_config module let us handle several types of objects in rancher:

Via rancher api:

  • users
  • role templates
  • project role templates
  • role template bindings
  • projects
  • clusters

Via kubernetes crds

  • users tokens

The module interface is fully described in ${ENVS_NG}/contexts/rancher2-schemas.cue. The module has some limitations. Because it does not handle rancher agent deployments, it cannot build role template bindings in the same terraform run. That limitation can be easily handled in pre apply scripts in envs-ng.