Playbook · Guide 2
How to find cloud resources created outside code
In short
By The Recovery Desk · Best Cloud Resilience · Re-verified October 2026
2 min read
Why do resources end up outside code?
People fix things in the console during an incident and never write the change down. Teams try a service by clicking through a wizard. Older systems predate the team's infrastructure-as-code practice. Other tools create resources on the team's behalf. Each one is a resource a rebuild from code will not recreate.
Step 1: How do you take the inventory?
Export the full resource inventory for one account from the cloud provider, including resources in regions you do not normally use. Then list everything each workspace's state file tracks. Match the two by resource identifier.
Step 2: How do you classify what you find?
Put every unmanaged resource in one of three groups:
- Adopt: the application needs it. Bring it into code.
- Delete: nobody needs it. Remove it after checking with the owner.
- Accept: it is created by the provider or another service and should not be in your code. Record why.
Start adopting with networking and identity, because almost everything else depends on them.
Step 3: How do you bring resources into code?
Write the definition, import the existing resource into state, and run a plan until it shows no changes. For large numbers of resources, codification tools generate the definitions for you. ControlMonkey generates Terraform for resources not in code, Firefly codifies to Terraform, OpenTofu, Pulumi, CloudFormation and Crossplane, and StackGuardian converts unmanaged resources into Terraform or OpenTofu. Generated code still needs review: names, variables and module structure are choices your team should own.
Step 4: How do you protect what matters most?
Mark critical resources so code cannot delete them by accident. OpenTofu 1.12.0, released in May 2026, lets the prevent_destroy lifecycle argument reference variables, so the protection can differ by environment, and adds a destroy = false option that removes a resource from state without deleting it. Both help when you reorganize code without touching live infrastructure.
Step 5: How do you stop the backlog growing back?
Make the console the exception. Restrict write access in production, require changes through pipelines, and alert on resources created outside them. ControlMonkey lists a ClickOps scanner in its Pro tier, and StackGuardian describes OPA/Rego policy guardrails.
How often should you repeat it?
After every incident and on a regular schedule, per account. Coverage decays as people work, and the cheapest time to adopt a resource is the week it was created.
Sources
Source: ControlMonkey homepage · Read 27 Sep 2026
Source: ControlMonkey pricing · Read 27 Sep 2026
Source: Firefly: product · Read 27 Sep 2026
Source: StackGuardian homepage · Read 27 Sep 2026
Source: OpenTofu blog: OpenTofu 1.12.0 · Read 27 Sep 2026
Source: AWS whitepaper: disaster recovery options in the cloud · Read 27 Sep 2026