|
1 | 1 | # Config - Cloud Control
|
2 | 2 |
|
3 |
| -Coming Soon |
| 3 | +aws-nuke supports removing resources via the AWS Cloud Control API. |
| 4 | + |
| 5 | +There are number of Cloud Control resources that are automatically registered as resources that can be removed by |
| 6 | +aws-nuke. Additionally, there are a number of resources implemented in aws-nuke that have a Cloud Control equivalent, |
| 7 | +this is called an **alternative resource**. |
| 8 | + |
| 9 | +For the subset of Cloud Control supported resources that are registered with aws-nuke they work like any other resource, |
| 10 | +but they are registered with their Cloud Control API name (i.e. `AWS::Bedrock::Agent`). |
| 11 | + |
| 12 | +However, there are resources that have already been implemented in aws-nuke that have a Cloud Control equivalent. For |
| 13 | +these resources an **alternative resource** has been defined. They are **MUTUALLY EXCLUSIVE**, if you include the Cloud |
| 14 | +Control resource in your config file, the native resource will be disabled. |
| 15 | + |
| 16 | +Furthermore, there are some Cloud Control resources that need special handling which are not yet supported by aws-nuke. |
| 17 | + |
| 18 | +Finally, even though the subset of automatically supported Cloud Control resources is limited, you can configure |
| 19 | +aws-nuke to make it try any additional resource. Either via command line flags of via the config file. |
| 20 | + |
| 21 | +## Why Use Cloud Control Resources |
| 22 | + |
| 23 | +The Cloud Control API is a standardized API that potentially allows you to nuke any resource regardless if it is defined |
| 24 | +within aws-nuke or not. This is especially useful for new resources that are not yet supported by aws-nuke. |
| 25 | + |
| 26 | +## Impact on Filters |
| 27 | + |
| 28 | +Because of how Cloud Control API resources work vs native implemented resources in aws-nuke, not all properties are |
| 29 | +available for filtering. For example, the `AWS::EC2::VPC` resource has a `VpcId` only, whereas the `EC2VPC` resource has |
| 30 | +`VpcID`, `Tags`, `OwnerID` and more. |
| 31 | + |
| 32 | +## Configuration |
| 33 | + |
| 34 | +For the config file you have to add the resource to the `resource-types.alternatives` list: |
| 35 | + |
| 36 | +!!! note |
| 37 | + If you are migrating from aws-nuke@v2 `cloud-control` is deprecated but still supported for backwards compatibility |
| 38 | + in the configuration file. The new key is `resource-types.alternatives`. |
| 39 | + |
| 40 | +```yaml |
| 41 | +resource-types: |
| 42 | + alternatives: |
| 43 | + - `AWS::EC2::TransitGateway |
| 44 | + - `AWS::EC2::VPC |
| 45 | +``` |
| 46 | +
|
| 47 | +If you want to use the command line, you have to add a `--cloud-control` flag for each resource you want to add: |
| 48 | + |
| 49 | +!!! important |
| 50 | + This will not limit the resources to only these two resources, but will add them to the list of resources that are |
| 51 | + automatically removed via Cloud Control. |
| 52 | + |
| 53 | +```console |
| 54 | +aws-nuke run \ |
| 55 | + -c nuke-config.yaml \ |
| 56 | + --cloud-control `AWS::EC2::TransitGateway \ |
| 57 | + --cloud-control `AWS::EC2::VPC |
| 58 | +``` |
| 59 | + |
| 60 | +## Supported Resources |
| 61 | + |
| 62 | +These are the resources that are automatically supported by aws-nuke directly as Cloud Control resources that are |
| 63 | +automatically scanned. |
| 64 | + |
| 65 | +- `AWS::AppFlow::ConnectorProfile` |
| 66 | +- `AWS::AppFlow::Flow` |
| 67 | +- `AWS::AppRunner::Service` |
| 68 | +- `AWS::ApplicationInsights::Application` |
| 69 | +- `AWS::Backup::Framework` |
| 70 | +- `AWS::ECR::PullThroughCacheRule` |
| 71 | +- `AWS::ECR::RegistryPolicy` |
| 72 | +- `AWS::ECR::ReplicationConfiguration` |
| 73 | +- `AWS::MWAA::Environment` |
| 74 | +- `AWS::Synthetics::Canary` |
| 75 | +- `AWS::Timestream::Database` |
| 76 | +- `AWS::Timestream::ScheduledQuery` |
| 77 | +- `AWS::Timestream::Table` |
| 78 | +- `AWS::Transfer::Workflow` |
| 79 | +- `AWS::NetworkFirewall::Firewall` |
| 80 | +- `AWS::NetworkFirewall::FirewallPolicy` |
| 81 | +- `AWS::NetworkFirewall::RuleGroup` |
| 82 | + |
| 83 | +## References |
| 84 | + |
| 85 | +- [Supported Resources](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/supported-resources.html) |
0 commit comments