Copy spring-boot jar into GCE Instance

Hello folks,

What is the best way copying some-spring-boot.jar into GCE Instance?

I thought this is quite a common task, but after googling found zero documentation about it.

I have already generated service account in GCP and saved all the stuff into gcp-credentials.json

terraform {
    required_providers {
        google = {
            source = "hashicorp/google"
        }
    }
}

provider "google" {
    version = "3.5.0"
    credentials = file("gcp-credentials.json")
    project = "some project"
    zone = "us-central1-a"
}

resource "google_compute_instance" "vm_instance" {
    name = "my-instance"
    machine_type = "e2-medium"
    #metadata_startup_script = file("startup.sh")

    tags = [
        "http-server",
        "https-server"]

    boot_disk {
        initialize_params {
            image = "some image with jdk"
        }
    }

    network_interface {
        network = "default"
        access_config {}
    }

    provisioner "file" {
        source = "../../../target/my-jar-1.0.0.jar"
        destination = "/tmp/my-jar-1.0.0.jar"

        connection {
            type = "ssh"
            user = "root"
            private_key = file("gcp-credentials.json")
            agent = "false"
        }
    }
}

Whenever I try to copy file it asks me for host. Please advise, I’m stuck

I have also posted here: https://stackoverflow.com/questions/64837832/upload-spring-boot-jar-into-gce-instance-using-terraform