rebuy-de / aws-nuke

Nuke a whole AWS account and delete all its resources.
https://github.com/ekristen/aws-nuke
MIT License
5.77k stars 724 forks source link

Cloud-control api support not working #1009

Closed mikemartin1090 closed 1 month ago

mikemartin1090 commented 1 year ago

Hello - I am trying to remove an "Amazon App Runner" instance from my account, but it is not yet supported in nuke (I've opened an issue here). To work around this, I figured I could leverage the cloud control api with [AWS::AppRunner::Service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html). However, that is not working.

I then tried to remove a VPC using the cloud control API as specified in the README.md (https://github.com/rebuy-de/aws-nuke#aws-cloud-control-api-support). However, when I add this to my config, there is no difference in the "Scan complete" results. I was expecting it to list the VPC's in my account, but it does not seem to load any results. I am using Administrator credentials, but it does not seem to make a difference. Here is the config:

regions:
  - global
  - us-east-1

account-blocklist:
  - "888888"

feature-flags:
  disable-deletion-protection:
    RDSInstance: true
    EC2Instance: true

resource-types:
  cloud-control:
  - AWS::EC2::VPC
  # only nuke these three resources
  targets:
  - S3Bucket

accounts:
  "9999":

I even tried to use the command line argument as outlined in the readme, but that still did not work.

The only results that I get are s3 buckets to be deleted. There is no VPC or app runner instance listed. Am I doing something incorrect?

sstoops commented 1 year ago

If you're going to use targeting, you'll need to add the AWS::EC2::VPC to that array as well.