I cannot for the life of me get pulumi to import e...
# general
p
I cannot for the life of me get pulumi to import existing GCP resources (instances). What am I doing wrong? resources.json:
Copy code
{
  "resources": [
    {
      "boot_disk": {
        "auto_delete": true,
        "initialize_params": {
          "image": "projects/suse-byos-cloud/global/images/sles-15-sp2-byos-v20210604",
          "size": 100
        }
      },
      "guest_accelerator": null,
      "id": "test-instance",
      "machine_type": "n1-standard-1",
      "network_interfaces": [
        {
          "address": "10.10.10.10",
          "subnetwork": "<https://www.googleapis.com/compute/v1/projects/myproj/regions/us-west1/subnetworks/mysubnet>",
          "type": "VIRTIO_NET"
        }
      ],
      "project": "myproj",
      "shielded_instance_config": null,
      "tags": null,
      "type": "gcp:compute/instance:Instance",
      "zone": "us-west1-a"
    }
  ]
}
command out:
Copy code
pulumi import -f resources.json
Previewing import (dev)

View Live: <https://app.pulumi.com/user/test-import/dev/previews/b6937451-d5e6-46ca-8d05-2fd6055e3119>

     Type                     Name             Plan       Info
 +   pulumi:pulumi:Stack      test-import-dev  create     1 error; 1 message
 =   └─ gcp:compute:Instance                   import     7 errors

Diagnostics:
  gcp:compute:Instance ():
    error: gcp:compute/instance:Instance resource '' has a problem: expected network_interface.0.nic_type to be one of [GVNIC VIRTIO_NET], got . Examine values at 'Instance.
NetworkInterfaces[0].NicType'.
    error: gcp:compute/instance:Instance resource '' has a problem: Computed attribute cannot be set. Examine values at 'Instance.NetworkInterfaces[0].Ipv6AccessType'.
    error: gcp:compute/instance:Instance resource '' has a problem: Computed attribute cannot be set. Examine values at 'Instance.NetworkInterfaces[0].Name'.
    error: gcp:compute/instance:Instance resource '' has a problem: ConflictsWith: "boot_disk.0.kms_key_self_link": conflicts with boot_disk.0.disk_encryption_key_raw. Examine values at 'Instance.BootDisk.KmsKeySelfLink'.
    error: gcp:compute/instance:Instance resource '' has a problem: ConflictsWith: "boot_disk.0.disk_encryption_key_raw": conflicts with boot_disk.0.kms_key_self_link. Examine values at 'Instance.BootDisk.DiskEncryptionKeyRaw'.
    error: gcp:compute/instance:Instance resource '' has a problem: Computed attribute cannot be set. Examine values at 'Instance.BootDisk.DiskEncryptionKeySha256'.
    error: Preview failed: one or more inputs failed to validate

  pulumi:pulumi:Stack (test-import-dev):
    Python 3.7 is approaching EOL and will not be supported in Pulumi soon. Check <https://github.com/pulumi/pulumi/issues/8131> for more details

    error: preview failed