pulumi import gcp notebook not working
See original GitHub issueHello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)
Issue details
gcloud notebooks instances list --location europe-west1-b
give
NAME LOCATION PROJECT STATE MACHINE_TYPE NETWORK SUBNET
notebook-test-2 europe-west1-b XXXX STOPPED n1-standard-1 default default
but running the import is not working
pulumi import gcp:notebooks/instance:Instance notebook_notebook-test-2 XXXXX/europe-west1-b/notebook-test-2
return
Diagnostics:
pulumi:pulumi:Stack (XXX-prod):
error: preview failed
gcp:notebooks:Instance (notebook_notebook-test-2):
error: gcp:notebooks/instance:Instance resource 'notebook_notebook-test-2' has a problem: ExactlyOne: "container_image": one of `container_image,vm_image` must be specified. Examine values at 'Instance.ContainerImage'.
error: gcp:notebooks/instance:Instance resource 'notebook_notebook-test-2' has a problem: ExactlyOne: "vm_image": one of `container_image,vm_image` must be specified. Examine values at 'Instance.VmImage'.
error: Preview failed: one or more inputs failed to validate
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
gcp.notebooks.Instance - Pulumi
Documentation for the gcp.notebooks.Instance resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >gcp.projects.Service - Pulumi
Documentation for the gcp.projects.Service resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >gcp.notebooks.Environment - Pulumi
Documentation for the gcp.notebooks.Environment resource with examples, input properties, output properties, lookup functions, ...
Read more >Troubleshooting Guide - Pulumi
This guide covers common troubleshooting techniques when using Pulumi, such as tracing, manually editing deployments, and resolving common errors.
Read more >gcp.projects.DefaultServiceAccounts - Pulumi
WARNING Some Google Cloud products do not work if the default service ... import * as pulumi from "@pulumi/pulumi"; import * as gcp...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This looks like a case where we’re probably overly optimistic in what inputs we can bring in. As a workaround, have you tried to use programmatic import? https://www.pulumi.com/docs/guides/adopting/import/#pulumi-import-resource-operation
@raphaelauv This should be non-blocking warning now. You may have to edit the generated code to accommodate the exact shape of your resource.