Importing Resources
The Import feature lets you bring existing cloud resources under MechCloud Stateless IaC management by converting the actual state into a desired state YAML template.
Overview
If you have resources already running in your cloud account that were created manually (via console, CLI, or other tools), you can import them into MechCloud's Stateless IaC. The import reads the actual state of your resources and generates a desired state YAML that you can use as a starting point.
How to Import
Navigate to Infrastructure → Stateless IaC
Select your Team, Cloud Provider, Cloud Account, Context, and Region
The Actual State panel on the right shows your current cloud resources
Click the Import button (arrow icon) in the Actual State panel header
MechCloud fetches the actual state and converts it into desired state YAML
The generated YAML appears in the Desired State editor on the left
What Happens During Import
MechCloud queries your cloud account for all resources in the selected context and region
Resources are converted to the MechCloud YAML format with
snake_casepropertiesCross-resource references are resolved to
ref:syntax where possibleThe generated YAML is placed in the Desired State editor, replacing any existing content
After Import
Once the desired state is populated:
Review the YAML — Check that all resources and properties look correct
Click Plan — Generate a plan to compare desired vs actual state
Verify "none" actions — All resources should show
action: nonesince they already existCustomize — Modify the YAML to add, update, or remove resources as needed
Apply changes — Use the normal Plan → Apply workflow for any modifications
Use Cases
Adopting IaC for existing infrastructure — Bring manually created resources under IaC management
Template generation — Use import as a starting point for new templates based on existing setups
Disaster recovery — Capture the current state as a template that can recreate the infrastructure
Supported Providers
Import is available for all cloud providers that support Stateless IaC:
AWS
Azure
GCP
Limitations
Import captures the current state at the time of import — it does not track ongoing changes
Some provider-specific properties may not be fully captured (e.g., tags, metadata)
The generated YAML may need manual adjustments for optimal readability
Last updated