https://rancher.com/ logo
#developer
Title
# developer
r

rhythmic-night-12176

06/02/2022, 5:20 PM
Hey all! I've built out my rancher cluster with terraform, and I've also deployed another rke cluster using terraform, I'd like to use TF to import the 2nd cluster into my rancher cluster but didn't really see it in the TF docs. Anyone have an example on hand that I could use? Summary: Import existing rke cluster into my rancher so I can manage it from the rancher UI using Terraform. TIA!
b

bulky-sunset-52084

06/04/2022, 4:10 PM
I don't really think there is a way to import an external cluster via the provider. But if it's RKE and being attached to rancher anyways why not just provision it as a downstream cluster from Rancher via the rancher2 provider? Importing seems like a lot of extra work and you'd need to manage a lot of the cluster configuration external to rancher. Whereas RKE especially is designed to integrate with the rancher UI/API very nicely.
r

rhythmic-night-12176

06/06/2022, 3:20 PM
The main reason, here, was to avoid circular dependencies. This cluster manages an HA Harbor install. Rancher would then use it to bootstrap itself which obviously doesn't work. With multiple rancher servers, we needed something external that would service everyone without being dependent on a specific rancher server.
However, I figured I'd at least be able to mange the Harbor cluster using Rancher's UI which would be for convenience.
4 Views