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

aws cloud map

因此,您在开发帐户上工作,并且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 map

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/331456.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

mysql error 1045 的解决方法

【0】README 1)以下是 解决方法的steps: step1)点击 skip 和 cancel 退出 mysql 配置 step2) 重启mysql server config wizard, 然后 remove instance step3) 随后卸载mysql(通过360或 …

Shell入门(五)之参数

一、Shell 传递参数 在执行 Shell 脚本时,向脚本传递参数,脚本内获取参数的格式为:$n。n 代表一个数字,0为执行文件名,1 为执行脚本的第一个参数,2 为执行脚本的第二个参数,以此类推 比如&…

openj9下载_Quarkus on OpenJ9 JVM和资源消耗

openj9下载除了本机模式,Quarkus在JVM模式下也能很好地运行,这有其自身的优势。 您可以使用替代的JVM,例如OpenJ9,它可以更好地消耗资源。 在下面的视频中,我将展示交换JVM有多么容易。 在视频中,我在最新…

Shell入门(六)之算术运算

一、数学运算 (1)原生bash不支持简单的数学运算,但是可以通过其他命令来实现,例如 awk 和 expr,expr 最常用。 (2)expr 是一款表达式计算工具,使用它能完成表达式的求值操作。 ex…

java数据库编程——执行SQL 语句

【0】README 1) 本文文字描述source code 均转自 core java volume 2 , 旨在理解 java数据库编程——执行SQL 语句 的基础知识 ; 2)for source code, please visit : https://github.com/pacosonTang/core-java-vol…

php cdi_Quarkus的其他(非标准)CDI功能

php cdiQuarkus支持CDI(上下文和依赖注入)2.0,但并非全部,仅支持最常见的功能。 但是,Quarkus确实包含一些非标准功能,这些功能对于开发人员非常方便,我想在下面的视频中进行展示。 不管您是否…

Shell入门(七)之关系运算

一、关系运算 shell关系运算符只支持数字,不支持字符串,除非字符串的值是数字。 a10 b20 运算符说明举例-eq检测两个数是否相等,相等返回 true。[ $a -eq $b ] 返回 false。-ne检测两个数是否相等,不相等返回 true。[ $a -ne $…

java数据库编程——Insert and Retrieve Images from MySql Table Using Java

【0】README0.1)本文翻译自 http://harmeetsingh13.blogspot.jp/2013/03/insert-and-retrieve-images-from-mysql.html【1】正文如下:段1)演示 从数据库表中插入和查询出图片。大多数情况下,图片数据都存储在数据库外部的一些文件…

Shell入门(八)之布尔运算

一、常规的布尔运算 常规的布尔运算符有:!、&&、|| 使用语法 ! exp exp && exp exp || exp [[ n op m && a op b]] ... exp为[ n op m ]或test n op m或true或false 二、条件测试的布尔运算 条件测试的布尔运算有:!、…

java switch语句_Java 14:查看更新的switch语句

java switch语句于2020年3月发布的JDK 14带有switch语句的更新版本。 这是JDK 12和JDK 13中的预览功能。 要了解差异,让我们看一个简单的示例。 假设我们要基于DayOfWeek枚举来计算每日工作时间。 使用旧的使用switch语句的方法,我们的解决方案可能如下…

java数据库编程——执行查询操作(一)

【0】README 1) 本文部分文字描述和source code 均转自 core java volume 2 , 旨在理解 java数据库编程——执行查询操作 的基础知识 ; 2) 本文和 java数据库编程——执行查询操作(二) 是姊妹篇&#xff…

Shell入门(九)之字符串比较

一、字符串比较 字符串比较符:、!、-z、-n、str 实际上,shell不区分数值与字符串类型,数值也可以使用上面比较。 a"mk" b"maokun" 运算符说明举例检测两个字符串是否相等,相等返回 true。[ $a $b ] 返回…

java中将毫秒转换成时间_在Java中将时间单位转换为持续时间

java中将毫秒转换成时间java.util.concurrent.TimeUnit以给定的粒度单位表示Java中的持续时间,并提供跨单位转换的实用方法。 java.util.concurrent.TimeUnit最早是在Java早期(1.5)引入的,但自那时以来已经扩展了好几次。 在此博客…

java数据库编程——执行查询操作(二)

【0】README 1) 本文部分文字描述和source code 均转自 core java volume 2 , 旨在理解 java数据库编程——执行查询操作(二) 的基础知识 ; 2) 本文和 java数据库编程——执行查询操作(一&…

Shell入门(十)之echo

一、echo参数 echo [参数选项] 字符串 参数选项 -e 解析字符串中的转义字符,如\n -E 这是默认设置,不解析转义字符 -n 不输出换行,可以使用echo -e 字符串"\c" 代替 #!/bin/bash a"abc\n" echo $a echo -e…

vaadin_Vaadin提示:延迟加载和商品标识

vaadin延迟加载 在Vaadin中使用网格,树或任何其他多值组件时,您通常希望显示数据库表中的数据,并且通常数据库中有多行。 在这种情况下,加载数千甚至数百万条记录是没有意义的,这将是一个巨大的性能问题。 对于此用例&…

com.mysql.jdbc.NotUpdatable: Result Set not updatable (references no primary keys).(解决方法)

【1】异常详细信息 com.mysql.jdbc.NotUpdatable: Result Set not updatable (references no primary keys). This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, …

jdk 取整数_JDK 15中的确切绝对整数

jdk 取整数JDK 15 Early Access Build b18向Math和StrictMath类引入了新方法,这些方法将在提供的值超出方法所支持的范围时抛出ArithmeticException ,而不会溢出。 这些方法为Java中的“绝对值”概念带来了Math.addExact , Math.subtractExac…

java数据库编程——可滚动和可更新的结果集

【0】README 1) 本文部分文字描述转自 core java volume 2 , 测试源代码均为原创, 旨在理解 java数据库编程——可滚动和可更新的结果集 的基础知识 ; 2)for database connection config, please visit :…