Skip to content

Commit

Permalink
Replace shell endpoint in cloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel committed Sep 20, 2024
1 parent 750dd34 commit 0b5b1c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions v3/services/terraformsvc/internal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,13 @@ func (v *VMController) handleProvision(vm *vmpb.VM) (error, bool) {
password = ""
}

shellEndpoint := vm.GetStatus().WsEndpoint

_, exists = config["cloud-config"]
if exists {
config["cloud-config"] = strings.Replace(config["cloud-config"], "$_SHELL_ENDPOINT_$", shellEndpoint, -1)
}

vmOwnerReference := []metav1.OwnerReference{
{
APIVersion: "hobbyfarm.io/v1",
Expand Down

0 comments on commit 0b5b1c1

Please sign in to comment.