Skip to main content
Once you know which resources are unmanaged, you can mark the ones another tool already manages, or delete the ones nobody needs. Both actions start from a list of unmanaged resources: an environment’s Unmanaged tab, an unmanaged resource collection, or the Orphaned, Unattributed and Unmanaged rows of the project tree. Select resources with their checkboxes to open the action bar.
Unmanaged tab with two resources selected and an action bar with Mark as managed and Generate delete commands highlighted
  1. Mark as managed assigns the selected resources to another tool.
  2. Generate delete commands builds the commands to delete them.

Mark resources as managed by another tool

Use this for resources that a tool other than env zero already manages, such as Crossplane, Pulumi or a team’s own scripts. They stop counting as unmanaged and show as Externally managed, and EZ Control Center stops suggesting to codify or delete them.
Marking resources as managed, and adding, editing or deleting rules, needs the Edit Organization Settings permission.
1

Select the resources

Select one or more unmanaged resources and click Mark as managed.
2

Name the tool

In Managed by, pick a suggested tool or type your own. The name becomes the rule’s name and shows on every matching resource. In Where (optional), add where they are managed, such as a repository URL or a console name.
Mark as managed dialog with Managed by set to Crossplane, Where set to github.com/acme/platform-crossplane, and Apply to set to the 2 selected resources
3

Choose what the rule covers

Under Apply to, pick one:
  • Only the selected resources: the rule covers these resources and no others. New resources are not included.
  • Every resource that matches these conditions: the rule covers every resource that matches, including resources found later. Conditions can use Tag, Resource Type, Account Name, Region, Name ends with, Unmanaged resource collection and Owner.
The dialog shows how many unmanaged resources the rule will mark. Click Show them to check the list.
4

Save

Click Mark as managed. The confirmation offers Undo and View rule.
Resources that env zero manages are never affected by a rule.

Manage rules

All rules are listed in Organization Settings > IaC Management.
IaC Management settings listing the built-in CloudFormation rule and a Spacelift rule, with Add rule and the Built in tag highlighted
  1. Add rule creates a rule from conditions, without selecting resources first.
  2. The Built in CloudFormation rule marks every AWS resource tagged aws:cloudformation:stack-name as managed by CloudFormation. You can turn it off, but not edit or delete it.
Edit or delete your own rules from their row. An organization can have up to 25 rules, and up to 100 resources selected one by one across all rules. For larger sets, use conditions instead of selecting resources.
A resource in a CloudFormation stack cannot be selected for either action. Change or delete it through its stack.

Delete unmanaged resources

EZ Control Center builds the CLI commands that delete the selected resources. You review the commands and run them yourself. env zero never runs them.
1

Select the resources

Select one or more unmanaged resources and click Generate delete commands. For one resource, you can also click Generate delete command in its details.
2

Review the commands

Delete 2 resources dialog confirming none are managed, with aws s3 rb and aws ec2 terminate-instances commands and a Copy commands button
  1. Before showing any command, EZ Control Center checks again which resources are managed, by env zero or by a rule. Managed resources are left out, and the dialog says how many.
  2. One command per resource, using the aws, gcloud or az CLI. A resource type with no delete command gets a # No delete command exists for comment instead.
  3. Copy commands copies them all.
3

Run them

Run the commands in a shell signed in to the right cloud account. Commands for resources whose names are only unique inside an account, such as IAM roles, run only when your AWS CLI is signed in to that account.
Deleting a cloud resource cannot be undone. Check each command before you run it. If the managed-state check fails, the dialog shows no commands.
After the next sync, deleted resources disappear from EZ Control Center.