Is there a way to transparently "adopt" default-created resources into Pulumi? The resource-level "import" parameter is close, but it requires the resource to match. For example, GCP creates a default VPC for new projects, so I'd like to "adopt" that VPC into my pulumi project automatically when a new stack is deployed.
e
echoing-dinner-19531
02/28/2025, 9:52 PM
but it requires the resource to match
This is so you don't get diffs. Do you intended to manage the VPC or do you just want to have read access to it's properties?
m
mammoth-memory-47255
02/28/2025, 9:53 PM
I want to manage the resource
mammoth-memory-47255
02/28/2025, 9:54 PM
I guess I can just have a predefined import.json to run on new environments before running
pulumi up
e
echoing-dinner-19531
02/28/2025, 9:56 PM
yeh that's probably the best answer for now. We probably do need to think about allowing the import option to just do an import and update in a single step for cases like this, but iirc there's some subtlety to that in the engine that makes it tricky
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.