question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pulumi import gcp notebook not working

See original GitHub issue

Hello!

  • 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leezencommented, Nov 12, 2021

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

0reactions
mikhailshilkovcommented, Mar 22, 2022

@raphaelauv This should be non-blocking warning now. You may have to edit the generated code to accommodate the exact shape of your resource.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found