因此,您在开发帐户上工作,并且Terraform陷入了一个循环,难道不让您轻易销毁剩余资源吗? 进入nuke CLI的世界!

在撰写本文时,我使用的是v0.1.16版

用Go语言编写的《 Gruntwork》不会破坏掉aws-nuke那样多的对象; 自2017年5月以来一直存在

如果您使用~/.aws/credentials ,请在~/.aws/credentials选择(明智地!)帐户别名(在我的情况下为myenv-dev ),然后:

AWS_PROFILE=myenv-dev ~/Downloads/cloud-nuke_darwin_amd64 aws

但是实际上,您可能希望将范围缩小到单个区域。 因此您必须在命令行中指定它:

AWS_PROFILE=myenv-dev ~/Downloads/cloud-nuke_darwin_amd64 aws  --region=eu-west-1

如果使用list参数aws --list-resource-types调用,则会获得支持删除哪些资源的列表:

ami
asg
ebs
ec2
ecsserv
eip
ekscluster
elb
elbv2
lc
rds
snap

在撰写本文时,我使用的是v2.14.0版本

用Ruby编写的rebuy.de将破坏许多对象(如果不是全部),则支持过滤器,需要配置文件; 自2016年6月以来一直存在。

您需要提供一个配置文件。 最小的文件可能是这样的nuke.yml文件

regions:
- eu-west-1
- global # for resources not bound to a specific region, such as Route53 zones for example
account-blacklist:
- "111222333444" # productionaccounts:"999888777666": {} # aws-nuke-example

如果您使用~/.aws/credentials ,请在~/.aws/credentials选择(明智地!)帐户别名(在我的情况下为myenv-dev ),然后:

AWS_PROFILE=myenv-dev ~/Downloads/aws-nuke-v2.14.0-darwin-amd64 --config nuke.yml

如果使用list参数resource-types调用,则会获得支持删除哪些资源的列表:

ACMCertificate
ACMPCACertificateAuthority
ACMPCACertificateAuthorityState
APIGatewayAPIKey
APIGatewayClientCertificate
APIGatewayDomainName
APIGatewayRestAPI
APIGatewayUsagePlan
APIGatewayVpcLink
AWSBackupPlan
AWSBackupRecoveryPoint
AWSBackupSelection
AWSBackupVault
AppStreamDirectoryConfig
AppStreamFleet
AppStreamFleetState
AppStreamImage
AppStreamImageBuilder
AppStreamImageBuilderWaiter
AppStreamStack
AppStreamStackFleetAttachment
AutoScalingGroup
AutoScalingPlansScalingPlan
BatchComputeEnvironment
BatchComputeEnvironmentState
BatchJobQueue
BatchJobQueueState
Cloud9Environment
CloudDirectoryDirectory
CloudDirectorySchema
CloudFormationStack
CloudFrontDistribution
CloudFrontDistributionDeployment
CloudHSMV2Cluster
CloudHSMV2ClusterHSM
CloudSearchDomain
CloudTrailTrail
CloudWatchAlarm
CloudWatchDashboard
CloudWatchEventsRule
CloudWatchEventsTarget
CloudWatchLogsDestination
CloudWatchLogsLogGroup
CodeBuildProject
CodeCommitRepository
CodeDeployApplication
CodePipelinePipeline
CodeStarProject
CognitoIdentityPool
CognitoUserPool
CognitoUserPoolDomain
ConfigServiceConfigRule
ConfigServiceConfigurationRecorder
ConfigServiceDeliveryChannel
DAXCluster
DAXParameterGroup
DAXSubnetGroup
DataPipelinePipeline
DatabaseMigrationServiceCertificate
DatabaseMigrationServiceEndpoint
DatabaseMigrationServiceEventSubscription
DatabaseMigrationServiceReplicationInstance
DatabaseMigrationServiceReplicationTask
DatabaseMigrationServiceSubnetGroup
DeviceFarmProject
DirectoryServiceDirectory
DynamoDBTable
DynamoDBTableItem
EC2Address
EC2ClientVpnEndpoint
EC2ClientVpnEndpointAttachment
EC2CustomerGateway
EC2DHCPOption
EC2Image
EC2Instance
EC2InternetGateway
EC2InternetGatewayAttachment
EC2KeyPair
EC2LaunchTemplate
EC2NATGateway
EC2NetworkACL
EC2NetworkInterface
EC2PlacementGroup
EC2RouteTable
EC2SecurityGroup
EC2Snapshot
EC2SpotFleetRequest
EC2Subnet
EC2TGW
EC2TGWAttachment
EC2VPC
EC2VPCEndpoint
EC2VPCEndpointServiceConfiguration
EC2VPCPeeringConnection
EC2VPNConnection
EC2VPNGateway
EC2VPNGatewayAttachment
EC2Volume
ECRRepository
ECSCluster
ECSClusterInstance
ECSService
ECSTaskDefinition
EFSFileSystem
EFSMountTarget
EKSCluster
ELB
ELBv2
ELBv2TargetGroup
EMRCluster
EMRSecurityConfiguration
ESDomain
ElasticBeanstalkApplication
ElasticBeanstalkEnvironment
ElasticTranscoderPipeline
ElasticacheCacheCluster
ElasticacheReplicationGroup
ElasticacheSubnetGroup
FSxBackup
FSxFileSystem
FirehoseDeliveryStream
GlueClassifier
GlueConnection
GlueCrawler
GlueDatabase
GlueDevEndpoint
GlueJob
GlueTrigger
IAMGroup
IAMGroupPolicy
IAMGroupPolicyAttachment
IAMInstanceProfile
IAMInstanceProfileRole
IAMLoginProfile
IAMOpenIDConnectProvider
IAMPolicy
IAMRole
IAMRolePolicy
IAMRolePolicyAttachment
IAMSAMLProvider
IAMServerCertificate
IAMServiceSpecificCredential
IAMUser
IAMUserAccessKey
IAMUserGroupAttachment
IAMUserPolicy
IAMUserPolicyAttachment
IAMVirtualMFADevice
IoTAuthorizer
IoTCACertificate
IoTCertificate
IoTJob
IoTOTAUpdate
IoTPolicy
IoTRoleAlias
IoTStream
IoTThing
IoTThingGroup
IoTThingType
IoTThingTypeState
IoTTopicRule
KMSAlias
KMSKey
KinesisAnalyticsApplication
KinesisStream
KinesisVideoProject
LambdaEventSourceMapping
LambdaFunction
LaunchConfiguration
LifecycleHook
LightsailDisk
LightsailDomain
LightsailInstance
LightsailKeyPair
LightsailLoadBalancer
LightsailStaticIP
MQBroker
MSKCluster
MachineLearningBranchPrediction
MachineLearningDataSource
MachineLearningEvaluation
MachineLearningMLModel
MediaConvertJobTemplate
MediaConvertPreset
MediaConvertQueue
MediaLiveChannel
MediaLiveInput
MediaLiveInputSecurityGroup
MediaPackageChannel
MediaPackageOriginEndpoint
MediaStoreContainer
MediaStoreDataItems
MediaTailorConfiguration
MobileProject
NeptuneCluster
NeptuneInstance
NetpuneSnapshot
OpsWorksApp
OpsWorksCMBackup
OpsWorksCMServer
OpsWorksCMServerState
OpsWorksInstance
OpsWorksLayer
OpsWorksUserProfile
RDSDBCluster
RDSDBClusterParameterGroup
RDSDBParameterGroup
RDSDBSubnetGroup
RDSInstance
RDSSnapshot
RedshiftCluster
RedshiftParameterGroup
RedshiftSnapshot
RedshiftSubnetGroup
RekognitionCollection
ResourceGroupGroup
RoboMakerDeploymentJob
RoboMakerFleet
RoboMakerRobot
RoboMakerRobotApplication
RoboMakerSimulationApplication
RoboMakerSimulationJob
Route53HostedZone
Route53ResourceRecordSet
S3Bucket
S3MultipartUpload
S3Object
SESConfigurationSet
SESIdentity
SESReceiptFilter
SESReceiptRuleSet
SESTemplate
SFNStateMachine
SNSEndpoint
SNSPlatformApplication
SNSSubscription
SNSTopic
SQSQueue
SSMActivation
SSMAssociation
SSMDocument
SSMMaintenanceWindow
SSMParameter
SSMPatchBaseline
SSMResourceDataSync
SageMakerEndpoint
SageMakerEndpointConfig
SageMakerModel
SageMakerNotebookInstance
SageMakerNotebookInstanceState
SecretsManagerSecret
ServiceCatalogConstraintPortfolioAttachment
ServiceCatalogPortfolio
ServiceCatalogPortfolioProductAttachment
ServiceCatalogPortfolioShareAttachment
ServiceCatalogPrincipalPortfolioAttachment
ServiceCatalogProduct
ServiceCatalogProvisionedProduct
ServiceCatalogTagOption
ServiceCatalogTagOptionPortfolioAttachment
ServiceDiscoveryInstance
ServiceDiscoveryNamespace
ServiceDiscoveryService
SimpleDBDomain
StorageGatewayFileShare
StorageGatewayGateway
StorageGatewayTape
StorageGatewayVolume
WAFRegionalByteMatchSet
WAFRegionalByteMatchSetIP
WAFRegionalIPSet
WAFRegionalIPSetIP
WAFRegionalRateBasedRule
WAFRegionalRateBasedRulePredicate
WAFRegionalRegexMatchSet
WAFRegionalRegexMatchTuple
WAFRegionalRegexPatternSet
WAFRegionalRegexPatternString
WAFRegionalRule
WAFRegionalRulePredicate
WAFRegionalWebACL
WAFRegionalWebACLRuleAttachment
WAFRule
WAFWebACL
WAFWebACLRuleAttachment
WorkLinkFleet
WorkSpacesWorkspace

结论

好吧,如果您需要删除everything并能够过滤掉一些资源,那么我想aws-nuke是您的最佳选择!

翻译自: https://www.javacodegeeks.com/2020/04/destroy-aws-resources-cloud-nuke-or-aws-nuke.html

销毁AWS资源:Cloud-Nuke还是AWS-Nuke?相关推荐

  1. aws lambda_Google Cloud Run与AWS Lambda

    aws lambda By Joao Cardoso, IOD Expert IOD专家 Joao Cardoso提供 When Amazon introduced Lambda in 2014, i ...

  2. aws cloud map_销毁AWS资源:Cloud-Nuke还是AWS-Nuke?

    aws cloud map 因此,您在开发帐户上工作,并且Terraform陷入了一个循环,难道不让您轻易销毁剩余资源吗? 进入nuke CLI的世界! 在撰写本文时,我使用的是v0.1.16版本 用 ...

  3. aws cloud map_Amazon EC2 – AWS Elastic Compute Cloud

    aws cloud map Amazon EC2 is an abbreviation for Elastic Compute Cloud. It's elastic in nature which ...

  4. ansible aws_如何使用Ansible管理您的AWS资源

    ansible aws Wouldn't you love to be able to simply wave a wand and layers of resources in your AWS a ...

  5. 如何删除 AWS 资源以及关闭账户(来自亚马逊官方提供文档,记录一下方便查看)

    如果贵公司决定不再使用当前的账号,希望关停账户且不再产生任何费用,我们建议您首先在本 地做好数据备份操作,以免数据丢失给您带来不必要的麻烦. 其次,您可以按照当前使用的服务分类,对您账户当前存在的资源 ...

  6. 20小时速通AWS Certified Cloud Practitioner (CLF-C01) 证书经验分享

    先介绍考试: Cloud Practitioner是AWS的入门级证书,适用于任何人群,难度较低,零基础即可报名. 考试全部为基础概念或基础场景应用的选择题,不涉及写代码. 报名费在北美是100美金, ...

  7. aws fargate_我如何在AWS Fargate上部署#100DaysOfCloud Twitter Bot

    aws fargate After passing my last certification, I asked myself how much time I spent studying cloud ...

  8. aws lambda使用_使用AWS Lambda安排Slack消息

    aws lambda使用 Migrating to serverless brings a lot of questions. How do you do some of the non-server ...

  9. aws spark_使用Spark构建AWS数据湖时的一些问题以及如何处理这些问题

    aws spark 技术提示 (TECHNICAL TIPS) 介绍 (Introduction) At first, it seemed to be quite easy to write down ...

最新文章

  1. ASP.NET模板引擎技术
  2. java强制关闭远程桌面_elasticsearch中的java.io.IOException: 远程主机强迫关闭了一个现有的连接...
  3. postman本地请求ip地址变成ipv6_华为认证-IPv6技术-ICMPv6介绍
  4. WSL 1 运行 Ubuntu 20.04 将会出现问题
  5. vue 实现文本的拖拽_基于Vue实现拖拽功能
  6. c语言水仙桃树编程,辰颐物语编辑部整理:春季适合种植哪些花卉品种?樱花和桃花怎么区分?...
  7. 重置SQLSERVER表的自增列,让自增列重新计数【转】
  8. ad敷铜后还有部分飞线_眼花缭乱!超级无敌的飞线大法,打造一把超低功耗无线机械键盘...
  9. python数据分析师网易城市数据团_城市数据分析师-网易云课堂 - 网易云课堂
  10. 蓝桥杯题目 黑色星期五
  11. Silverlight常见问题解决方法
  12. 绿联USB转RS-485/422转换器
  13. CSTAnbsp;【Computer-Supportedamp;n…
  14. python自动化测试工程师面试题(转载师傅:上海悠悠)
  15. Web安全常见基本知识
  16. 被玩坏的IE浏览器——漏洞利用方法和技巧介绍
  17. 【Flask】官方教程(Tutorial)-part2:蓝图-视图、模板、静态文件
  18. 【记录问题】vs2017连接sql2008数据库时显示该文件正在使用
  19. Java实现 蓝桥杯VIP 算法提高 聪明的美食家
  20. EventManager

热门文章

  1. jzoj4817-square【区间RMQ,二分答案】
  2. hdu4699-Editor【对顶栈】
  3. ssl2644-线段树练习1【线段树】
  4. 【2018.4.14】模拟赛之三-ssl2393 单元格
  5. codeforces229 D. Towers(dp+贪心)
  6. 2725. [Violet 6]故乡的梦(删边最短路同[TJOI2012]桥)
  7. Prufer序列 生成树定理
  8. 已知两个链表A和B分别表示两个集合,其元素递增排列。请设计算法求出两个集合A和集合B的差集(近由在A中出现而不再B中出现的元素所构成的集合),并以同样的形式存储,同时返回该集合的元素个数。
  9. jQuery动画与事件概念以及语法
  10. ssh(Spring+Spring mvc+hibernate)——applicationContext-servlet.xml