Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (39 loc) · 1.43 KB

deletion-order.md

File metadata and controls

43 lines (39 loc) · 1.43 KB

AWS resource deletion order

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.

Order

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.

  1. S3 Bucket
    1. S3 Object
  2. Route53 HostedZone
    1. Route53 RecordSet
  3. EC2 RouteTableAssociation
  4. EC2 Instance
  5. AutoScaling Group
  6. AutoScaling LaunchConfiguration
  7. ElasticLoadBalancer
  8. EC2 NAT Gateway
  9. ElasticIPAssociation
  10. ElasticIP (Allocation)
  11. IAM InstanceProfile
    1. IAM Role Association
  12. IAM Role
  13. IAM User
  14. EC2 InternetGateway
    1. EC2 InternetGatewayAttachment
  15. EC2 NetworkInterface
  16. EC2 NetworkACL
    1. EC2 NetworkACL Entry
  17. EC2 VPN Connection
    1. EC2 VPN Connection Route
  18. EC2 CustomerGateway
  19. EBS Volume
  20. EC2 Subnet
  21. EC2 RouteTable
    1. EC2 RouteTable Route
  22. EC2 SecurityGroup
    1. EC2 SecurityGroup Ingress Rule
    2. EC2 SecurityGroup Egress Rule
  23. EC2 VPN Gateway
    1. EC2 VPN Gateway Attachment
  24. EC2 VPC
    1. EC2 VPC CIDRBlock