Skip to content
import-pulumi logo

Import Pulumi

import-pulumi

Guide for importing existing Google Cloud resources into Pulumi state. Use when the user says "import resource to Pulumi", "add existing GCP resource", or needs to bring existing infrastructure under Pulumi management.

SKILL.md

Full skill instructions

import-pulumi

Import existing GCP resources into Pulumi state.

Trigger Examples

  • "Import resource to Pulumi"
  • "Add existing GCP resource to state"
  • "Bring this resource under Pulumi management"

Prerequisites

  • Pulumi project exists under infra/
  • Target resources already exist in Google Cloud
  • Pulumi backend (GCS) is configured
  • Authentication to Google Cloud is available

Execution Flow

1. Confirm Stack and Resource Type

Validate stack is one of: shared, dev, prod

2. Gather Resource Information

Prompt for GCP metadata:

  • Project ID (e.g., koborin-ai)
  • Region/​location (asia-northeast1)
  • Resource name/​ID
  • Any secondary identifiers

3. Resolve Pulumi Resource Name

Inspect infra/​src/​stacks/​*.ts to find the Pulumi resource name.

4. Build Import Command

Use CLI-based import (NOT code-based import options):

cd infra
pulumi stack select <stack>
pulumi import <resource-type> <resource-name> "<import-id>" --yes

5. Provide Command to User

Run the following commands:

cd infra
export PULUMI_BACKEND_URL=gs://${BUCKET_NAME}/​pulumi
export PULUMI_CONFIG_PASSPHRASE=""
pulumi stack select <stack>

pulumi import <resource-type> <resource-name> "<import-id>" --yes

Let me know "success" or share the error output.

6. Wait for Result

  • Success: Move to next resource or verify with pulumi preview
  • Failure: Analyze error and adjust

7. Verify After Imports

pulumi stack ls
pulumi preview
# Expected: minimal changes

Import ID Formats

Resource TypeImport ID Format
gcp:cloudrunv2/​service:Serviceprojects/​{project}/​locations/​{region}/​services/​{name}
gcp:cloudrunv2/​serviceIamMember:ServiceIamMemberprojects/​{project}/​locations/​{region}/​services/​{name} {role} {member}
gcp:projects/​service:Service{project}/​{api}
gcp:compute/​globalAddress:GlobalAddressprojects/​{project}/​global/​addresses/​{name}
gcp:compute/​backendService:BackendServiceprojects/​{project}/​global/​backendServices/​{name}
gcp:compute/​regionNetworkEndpointGroup:RegionNetworkEndpointGroupprojects/​{project}/​regions/​{region}/​networkEndpointGroups/​{name}
gcp:iam/​workloadIdentityPool:WorkloadIdentityPoolprojects/​{project}/​locations/​global/​workloadIdentityPools/​{pool}
gcp:serviceaccount/​account:Accountprojects/​{project}/​serviceAccounts/​{email}
gcp:projects/​iAMMember:IAMMember{project} {role} {member}
gcp:artifactregistry/​repository:Repositoryprojects/​{project}/​locations/​{region}/​repositories/​{name}

Example: Import Cloud Run Service

Command:

/​import-pulumi dev cloudrunv2/​service:Service

Conversation:

Please share the existing resource information:
- Project ID:
- Location (region):
- Service name:

User:

Project ID: koborin-ai
Location: asia-northeast1
Service name: koborin-ai-web-dev

Agent:

Run the following commands:

cd infra
pulumi stack select dev

pulumi import gcp:cloudrunv2/​service:Service web-dev \
  "projects/​koborin-ai/​locations/​asia-northeast1/​services/​koborin-ai-web-dev" --yes

Let me know the result.

Important Notes

  1. CLI Import Only: Always use pulumi import command. Never use code-based import options in resource definitions.

  2. One at a Time: Import resources one at a time, waiting for confirmation.

  3. Verify After: Always run pulumi preview after importing to spot drift.

  4. CI/​CD Only for Apply: Import can be done locally, but pulumi up should only run via GitHub Actions.

Error Handling

  • "Resource already exists in state": Check with pulumi stack and skip
  • "Resource not found": Verify identifiers and project/​region
  • "Permission denied": Authenticate with sufficient IAM roles

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View