Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultAwsResourceExclusionTagKey = "cloud-nuke-excluded"
Variables ¶
This section is empty.
Functions ¶
func ShouldInclude ¶ added in v0.1.26
func ShouldInclude(name string, includeREs []Expression, excludeREs []Expression) bool
ShouldInclude - Checks if a resource's Name should be included according to the inclusion and exclusion rules
Types ¶
type Config ¶
type Config struct {
ACM ResourceType `yaml:"ACM"`
ACMPCA ResourceType `yaml:"ACMPCA"`
AMI ResourceType `yaml:"AMI"`
APIGateway ResourceType `yaml:"APIGateway"`
APIGatewayV2 ResourceType `yaml:"APIGatewayV2"`
AccessAnalyzer ResourceType `yaml:"AccessAnalyzer"`
AutoScalingGroup ResourceType `yaml:"AutoScalingGroup"`
AppRunnerService ResourceType `yaml:"AppRunnerService"`
BackupVault ResourceType `yaml:"BackupVault"`
CloudWatchAlarm ResourceType `yaml:"CloudWatchAlarm"`
CloudWatchDashboard ResourceType `yaml:"CloudWatchDashboard"`
CloudWatchLogGroup ResourceType `yaml:"CloudWatchLogGroup"`
CloudtrailTrail ResourceType `yaml:"CloudtrailTrail"`
CodeDeployApplications ResourceType `yaml:"CodeDeployApplications"`
ConfigServiceRecorder ResourceType `yaml:"ConfigServiceRecorder"`
ConfigServiceRule ResourceType `yaml:"ConfigServiceRule"`
DataSyncLocation ResourceType `yaml:"DataSyncLocation"`
DataSyncTask ResourceType `yaml:"DataSyncTask"`
DBGlobalClusters ResourceType `yaml:"DBGlobalClusters"`
DBClusters ResourceType `yaml:"DBClusters"`
DBInstances ResourceType `yaml:"DBInstances"`
DBGlobalClusterMemberships ResourceType `yaml:"DBGlobalClusterMemberships"`
DBSubnetGroups ResourceType `yaml:"DBSubnetGroups"`
DynamoDB ResourceType `yaml:"DynamoDB"`
EBSVolume ResourceType `yaml:"EBSVolume"`
ElasticBeanstalk ResourceType `yaml:"ElasticBeanstalk"`
EC2 ResourceType `yaml:"EC2"`
EC2DedicatedHosts ResourceType `yaml:"EC2DedicatedHosts"`
EC2DHCPOption ResourceType `yaml:"EC2DhcpOption"`
EC2KeyPairs ResourceType `yaml:"EC2KeyPairs"`
EC2IPAM ResourceType `yaml:"EC2IPAM"`
EC2IPAMPool ResourceType `yaml:"EC2IPAMPool"`
EC2IPAMResourceDiscovery ResourceType `yaml:"EC2IPAMResourceDiscovery"`
EC2IPAMScope ResourceType `yaml:"EC2IPAMScope"`
EC2Endpoint ResourceType `yaml:"EC2Endpoint"`
EC2Subnet EC2ResourceType `yaml:"EC2Subnet"`
EgressOnlyInternetGateway ResourceType `yaml:"EgressOnlyInternetGateway"`
ECRRepository ResourceType `yaml:"ECRRepository"`
ECSCluster ResourceType `yaml:"ECSCluster"`
ECSService ResourceType `yaml:"ECSService"`
EKSCluster ResourceType `yaml:"EKSCluster"`
ELBv1 ResourceType `yaml:"ELBv1"`
ELBv2 ResourceType `yaml:"ELBv2"`
ElasticFileSystem ResourceType `yaml:"ElasticFileSystem"`
ElasticIP ResourceType `yaml:"ElasticIP"`
Elasticache ResourceType `yaml:"Elasticache"`
ElasticacheParameterGroups ResourceType `yaml:"ElasticacheParameterGroups"`
ElasticacheSubnetGroups ResourceType `yaml:"ElasticacheSubnetGroups"`
GuardDuty ResourceType `yaml:"GuardDuty"`
IAMGroups ResourceType `yaml:"IAMGroups"`
IAMPolicies ResourceType `yaml:"IAMPolicies"`
IAMRoles ResourceType `yaml:"IAMRoles"`
IAMServiceLinkedRoles ResourceType `yaml:"IAMServiceLinkedRoles"`
IAMUsers ResourceType `yaml:"IAMUsers"`
KMSCustomerKeys KMSCustomerKeyResourceType `yaml:"KMSCustomerKeys"`
KinesisStream ResourceType `yaml:"KinesisStream"`
KinesisFirehose ResourceType `yaml:"KinesisFirehose"`
LambdaFunction ResourceType `yaml:"LambdaFunction"`
LambdaLayer ResourceType `yaml:"LambdaLayer"`
LaunchConfiguration ResourceType `yaml:"LaunchConfiguration"`
LaunchTemplate ResourceType `yaml:"LaunchTemplate"`
MacieMember ResourceType `yaml:"MacieMember"`
MSKCluster ResourceType `yaml:"MSKCluster"`
NatGateway ResourceType `yaml:"NatGateway"`
OIDCProvider ResourceType `yaml:"OIDCProvider"`
OpenSearchDomain ResourceType `yaml:"OpenSearchDomain"`
Redshift ResourceType `yaml:"Redshift"`
RdsSnapshot ResourceType `yaml:"RdsSnapshot"`
RdsParameterGroup ResourceType `yaml:"RdsParameterGroup"`
RdsProxy ResourceType `yaml:"RdsProxy"`
S3 ResourceType `yaml:"s3"`
S3AccessPoint ResourceType `yaml:"S3AccessPoint"`
S3ObjectLambdaAccessPoint ResourceType `yaml:"S3ObjectLambdaAccessPoint"`
S3MultiRegionAccessPoint ResourceType `yaml:"S3MultiRegionAccessPoint"`
SESIdentity ResourceType `yaml:"SesIdentity"`
SESConfigurationSet ResourceType `yaml:"SesConfigurationset"`
SESReceiptRuleSet ResourceType `yaml:"SesReceiptRuleSet"`
SESReceiptFilter ResourceType `yaml:"SesReceiptFilter"`
SESEmailTemplates ResourceType `yaml:"SesEmailTemplates"`
SNS ResourceType `yaml:"SNS"`
SQS ResourceType `yaml:"SQS"`
SageMakerNotebook ResourceType `yaml:"SageMakerNotebook"`
SecretsManagerSecrets ResourceType `yaml:"SecretsManager"`
SecurityHub ResourceType `yaml:"SecurityHub"`
Snapshots ResourceType `yaml:"Snapshots"`
TransitGateway ResourceType `yaml:"TransitGateway"`
TransitGatewayRouteTable ResourceType `yaml:"TransitGatewayRouteTable"`
TransitGatewaysVpcAttachment ResourceType `yaml:"TransitGatewaysVpcAttachment"`
TransitGatewayPeeringAttachment ResourceType `yaml:"TransitGatewayPeeringAttachment"`
VPC EC2ResourceType `yaml:"VPC"`
Route53HostedZone ResourceType `yaml:"Route53HostedZone"`
Route53CIDRCollection ResourceType `yaml:"Route53CIDRCollection"`
Route53TrafficPolicy ResourceType `yaml:"Route53TrafficPolicy"`
InternetGateway ResourceType `yaml:"InternetGateway"`
NetworkACL ResourceType `yaml:"NetworkACL"`
NetworkInterface ResourceType `yaml:"NetworkInterface"`
SecurityGroup EC2ResourceType `yaml:"SecurityGroup"`
NetworkFirewall ResourceType `yaml:"NetworkFirewall"`
NetworkFirewallPolicy ResourceType `yaml:"NetworkFirewallPolicy"`
NetworkFirewallRuleGroup ResourceType `yaml:"NetworkFirewallRuleGroup"`
NetworkFirewallTLSConfig ResourceType `yaml:"NetworkFirewallTLSConfig"`
NetworkFirewallResourcePolicy ResourceType `yaml:"NetworkFirewallResourcePolicy"`
VPCLatticeServiceNetwork ResourceType `yaml:"VPCLatticeServiceNetwork"`
VPCLatticeService ResourceType `yaml:"VPCLatticeService"`
VPCLatticeTargetGroup ResourceType `yaml:"VPCLatticeTargetGroup"`
}
Config - the config object we pass around
func (*Config) AddEC2DefaultOnly ¶ added in v0.36.0
func (*Config) AddExcludeAfterTime ¶ added in v0.33.0
func (*Config) AddIncludeAfterTime ¶ added in v0.33.0
func (*Config) AddTimeout ¶ added in v0.35.0
type EC2ResourceType ¶ added in v0.36.0
type EC2ResourceType struct {
DefaultOnly bool `yaml:"default_only"`
ResourceType `yaml:",inline"`
}
type Expression ¶ added in v0.1.26
func (*Expression) UnmarshalText ¶ added in v0.1.26
func (expression *Expression) UnmarshalText(data []byte) error
UnmarshalText - Internally used by yaml.Unmarshal to unmarshall an Expression field
type FilterRule ¶
type KMSCustomerKeyResourceType ¶ added in v0.33.0
type KMSCustomerKeyResourceType struct {
IncludeUnaliasedKeys bool `yaml:"include_unaliased_keys"`
ResourceType `yaml:",inline"`
}
type ResourceType ¶
type ResourceType struct {
IncludeRule FilterRule `yaml:"include"`
ExcludeRule FilterRule `yaml:"exclude"`
Timeout string `yaml:"timeout"`
}
func (ResourceType) ShouldInclude ¶ added in v0.33.0
func (r ResourceType) ShouldInclude(value ResourceValue) bool
func (ResourceType) ShouldIncludeBasedOnTag ¶ added in v0.33.0
func (r ResourceType) ShouldIncludeBasedOnTag(tags map[string]string) bool
func (ResourceType) ShouldIncludeBasedOnTime ¶ added in v0.33.0
func (r ResourceType) ShouldIncludeBasedOnTime(time time.Time) bool
Click to show internal directories.
Click to hide internal directories.