hi everyone, curious if anybody has managed to cre...
# google-cloud
m
hi everyone, curious if anybody has managed to create an instance from an image in another project - I’m having trouble with it. first, I’m getting an error when including the google_beta provider as detailed in the example - but when I don’t include it, I get errors when trying to pull the image because it uses the configured deployment project instead of the project I’m trying to get the image from here’s my code block:
Copy code
server_instance = gcp.compute.InstanceFromMachineImage("github-server",
    zone="australia-southeast2-a",
    machine_type="n1-standard-8",
    source_machine_image="projects/github-enterprise-public/global/machineImages/github-enterprise-3-1-3",
    can_ip_forward=False,
    network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
        network=vpc_network.id,
        access_configs=[gcp.compute.InstanceNetworkInterfaceAccessConfigArgs(
            nat_ip=static.address
        )])],
    opts=pulumi.ResourceOptions(provider=google_beta))
but when I run it without the beta_provider I get this error regarding the machine image (it’s interpolating the configured project ID):
Copy code
Diagnostics:
  pulumi:pulumi:Stack (furo-github-server-dev):
    error: update failed

  gcp:compute:InstanceFromMachineImage (github-server):
    error: 1 error occurred:
        * googleapi: Error 404: The resource 'projects/<redacted-but-should-be-github-enterprise-public>/global/machineImages/github-enterprise-3-1-3' was not found, notFound

Resources:
    - 1 deleted
    10 unchanged

Duration: 15s
thanks for any insight 🙂