import-pulumi

Solid

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.

DevOps & Infrastructure 9 stars 1 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
33
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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): ```bash cd infra pulumi stack select <stack> pulumi import <resource-type> <resource-name> "<import-id>" --yes ``` ### 5. Provide Command to User ```text 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 ```bash pulumi stack ls pulum...

Details

Author
koborin-ai
Repository
koborin-ai/site
Created
9 months ago
Last Updated
3 days ago
Language
MDX
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category