AWS resources have (potentially many) dependencies that must be explicitly detached/removed/deleted before deleting a top-level resource (ex. a VPC). Therefore a deletion order must be enforced. This order is universal for all AWS resources and is not use-case-specific, because deletion actions will only run if a resource with a specific tag, or one of it's dependencies, is detected.
The following order is not fixed and subject to change as more resource types are supported by grafiti. Sublists of resources are children that are implicitly deleted, i.e. deleted only when deleting their parent resource.
- S3 Bucket
- S3 Object
- Route53 HostedZone
- Route53 RecordSet
- EC2 RouteTableAssociation
- EC2 Instance
- AutoScaling Group
- AutoScaling LaunchConfiguration
- ElasticLoadBalancer
- EC2 NAT Gateway
- ElasticIPAssociation
- ElasticIP (Allocation)
- IAM InstanceProfile
- IAM Role Association
- IAM Role
- IAM User
- EC2 InternetGateway
- EC2 InternetGatewayAttachment
- EC2 NetworkInterface
- EC2 NetworkACL
- EC2 NetworkACL Entry
- EC2 VPN Connection
- EC2 VPN Connection Route
- EC2 CustomerGateway
- EBS Volume
- EC2 Subnet
- EC2 RouteTable
- EC2 RouteTable Route
- EC2 SecurityGroup
- EC2 SecurityGroup Ingress Rule
- EC2 SecurityGroup Egress Rule
- EC2 VPN Gateway
- EC2 VPN Gateway Attachment
- EC2 VPC
- EC2 VPC CIDRBlock