Pulumi state import

Hi, i want to use the Pulumi cloudflare provider and wanted to ask if there is any way to import the current state like there is for Terraform/OpenTofu with https://github.com/cloudflare/cf-terraforming. Thanks!
1 Reply
SuperHelpflare
Support AI
According to the Pulumi documentation, there isn't a direct equivalent to cf-terraforming for importing existing Cloudflare resources into Pulumi. However, you can use the pulumi import command to import existing resources into your Pulumi state. Here's an example of how you can import a Cloudflare zone into Pulumi:
pulumi import cloudflare:index/zone:Zone my-zone <zone-id>
pulumi import cloudflare:index/zone:Zone my-zone <zone-id>
Replace <zone-id> with the actual ID of the zone you want to import. You can also use the pulumi import command to import other Cloudflare resources, such as DNS records, load balancers, and more. Keep in mind that importing resources into Pulumi will only update the Pulumi state, and will not modify the actual resources in Cloudflare. If you want to manage the resources using Pulumi, you'll need to update the Pulumi configuration to match the imported state. You can find more information about importing resources into Pulumi in the Pulumi documentation. Source: https://www.pulumi.com/docs/import/
Feedback
Feedback has been submitted! Thank you :)
This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.

Did you find this page helpful?