hi all, question. Have a resource that was built ...
# general
w
hi all, question. Have a resource that was built via pulumi, the resource was delete manually in a cloud console. Upon re-running pulumi up an error now appears which makes sense. Is there a way for pulumi to continue even though the exception is raised for the resource not existing ? Error:
Copy code
error 404 Resource '...resource identifier...' was not found.
s
Which provider/resource is it?
w
gcp native, the resource is notebooks.Schedule
s
Is it particular to that resource, or any GCP resource? Also, can you post some code so I have a little more context?
w
Copy code
import pulumi
from pulumi_google_native.storage import v1 as storage
from pulumi_google_native.notebooks import v1 as notebooks


bucket = storage.Bucket(
    resource_name="gcp-notebook-bucket",
    name="gcp-notebook-bucket",
    location="northamerica-northeast1",
)

pulumi.export("gcp-notebook-bucket", bucket.self_link)


nb = notebooks.Schedule(
    resource_name="notebook_test",
    args=notebooks.ScheduleArgs(
        schedule_id="schedule_id",
        cron_schedule="*/10 * * * *",
        description="notebook_test",
        location="northamerica-northeast1",
        project="no-vcpsc-registry",
        time_zone="UTC",
        execution_template=notebooks.ExecutionTemplateArgs(
            scale_tier=notebooks.ExecutionTemplateScaleTier("CUSTOM"),
            input_notebook_file="<gs://gcp-notebook-bucket/notebook_test.ipynb>",
            master_type="n1-standard-4",
            job_type=notebooks.ExecutionTemplateJobType("VERTEX_AI"),
            output_notebook_folder="<gs://gcp-notebook-bucket/output2>",
            params_yaml_file="<gs://gcp-notebook-bucket/parameters.yaml>",
            container_image_uri="<http://gcr.io/deeplearning-platform-release/base-cpu|gcr.io/deeplearning-platform-release/base-cpu>",
            vertex_ai_parameters=notebooks.VertexAIParametersArgs(
                network="projects/no-vcpsc-registry/global/networks/nb-network", env={}
            ),
        ),
    ),
    opts=pulumi.resource.ResourceOptions(
        delete_before_replace=True,
        replace_on_changes=["cron_schedule", "execution_template", "schedule_id"],
    ),
)
fail is on the notebook resource
f
you can delete it from the state file specifying the urn of the resource