helpful-tent-95136
09/29/2021, 8:59 AMgcp.compute.InstanceFromMachineImage
when using it across projects?
For example:
const myInstance = new gcp.compute.InstanceFromMachineImage(
`my-instance`,
{
zone: 'australia-southeast1-a',
project: 'vm-project',
sourceMachineImage: 'projects/image-project/global/machineImages/my-image',
networkInterfaces: [{ network: vpcId, subnetwork: mySubnet }],
}
);
when I do this, it tries to look up sourceMachineImage
from 'projects/vm-project/global/machineImages/my-image'
which of course doesn't exist ๐
Any ideas?mysterious-pager-42871
09/29/2021, 10:38 PMinstance = gcp.compute.Instance("example",
name="example",
project="example_project",
machine_type="n1-standard-8",
zone="example-zone"",
boot_disk=gcp.compute.InstanceBootDiskArgs(
initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
image="image-project/image-name"
)),
network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
network="example_network",
subnetwork="example_subnet",
access_configs=[gcp.compute.InstanceNetworkInterfaceAccessConfigArgs(
nat_ip="example_vm_ip"
)],
)],
service_account=gcp.compute.InstanceServiceAccountArgs(
scopes=["<https://www.googleapis.com/auth/cloud-platform>"],
),
opts=pulumi.ResourceOptions(depends_on=[]))
gcp.compute.InstanceFromMachineImage
resource, I never did get it to workhelpful-tent-95136
09/30/2021, 3:47 AMError resolving image name 'image-project/image-name': Could not find image or image-project/image-name
I've tried both image-project/image-name
as in your example, and 'projects/image-project/global/machineImages/image-name'
image-project
project ๐mysterious-pager-42871
09/30/2021, 4:09 AMhelpful-tent-95136
10/01/2021, 4:15 AM