googleapi:带有正文的HTTP响应代码404:未找到

时间:2018-10-23 07:41:17

标签: google-compute-engine

当我尝试使用Golang“ libretto”库从脚本实例VM时遇到此问题

vm := &gcp.VM{
    Name:        "test-vm-2",
    Zone:        "us-central1-f",
    MachineType: "n1-standard-1",
    SourceImage: "centos-7-v20181011",
    Disks: []gcp.Disk{
        {
            DiskType:   "pd-standard",
            DiskSizeGb: 10,
            AutoDelete: true,
        },
    },
    Preemptible:   false,
    Network:       "default",
    Subnetwork:    "default",
    UseInternalIP: false,
    Project:       os.Getenv(accountFile.ProjectID),
    Scopes: []string {
        "https://www.googleapis.com/auth/devstorage.read_write",
        "https://www.googleapis.com/auth/logging.write",
    },

    AccountFile: "key.json",
    SSHCreds: ssh.Credentials {
        SSHUser:       "VinCur",
        SSHPrivateKey: accountFile.PrivateKey,
    },
    SSHPublicKey: pub_ssh,
}

这是代码...一些解决方案?

0 个答案:

没有答案