Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Config is the underlying libnuke configuration. *config.Config `yaml:",inline"` // BlocklistTerms is a list of keywords that are blocklisted from being used in an alias. // If any of these keywords are found in an alias, the nuke will abort. BlocklistTerms []string `yaml:"blocklist-terms"` // NoBlocklistTermsDefault is a setting that can be used to disable the default terms from being added to the // blocklist. NoBlocklistTermsDefault bool `yaml:"no-blocklist-terms-default"` // BypassAliasCheckAccounts is a list of account IDs that will be allowed to bypass the alias check. // This is useful for accounts that don't have an alias for a number of reasons, it must be used with a cli // flag --no-alias-check to be effective. BypassAliasCheckAccounts []string `yaml:"bypass-alias-check-accounts"` // FeatureFlags is a collection of feature flags that can be used to enable or disable certain behaviors on // resources. This is left over from the AWS Nuke tool and is deprecated. It was left to make the transition to the // library and ekristen/aws-nuke@v3 easier for existing users. // Deprecated: Use Settings instead. Will be removed in 4.x FeatureFlags *FeatureFlags `yaml:"feature-flags"` // CustomEndpoints is a collection of custom endpoints that can be used to override the default AWS endpoints. CustomEndpoints CustomEndpoints `yaml:"endpoints"` }
Config is an extended configuration implementation that adds some additional features on top of the libnuke config.
func New ¶
New creates a new extended configuration from a file. This is necessary because we are extended the default libnuke configuration to contain additional attributes that are specific to the AWS Nuke tool.
func (*Config) InBypassAliasCheckAccounts ¶
InBypassAliasCheckAccounts returns true if the specified account ID is in the bypass alias check accounts list.
func (*Config) ResolveDeprecatedFeatureFlags ¶
func (c *Config) ResolveDeprecatedFeatureFlags()
ResolveDeprecatedFeatureFlags resolves any deprecated feature flags in the configuration. This converts the legacy feature flags into the new settings format. The feature flags will be deprecated with version 4.x. This was left in place to make the transition to the libnuke library and ekristen/aws-nuke@v3 easier for existing users.
func (*Config) ValidateAccount ¶
ValidateAccount validates the account ID and aliases for the specified account. This will return an error if the account ID is invalid, the account ID is blocklisted, the account doesn't have an alias, the account alias contains the substring 'prod', or the account ID isn't listed in the config.
type CustomEndpoints ¶
type CustomEndpoints []*CustomRegion
CustomEndpoints is a collection of custom region endpoints that can be used to override the default AWS regions
func (CustomEndpoints) GetRegion ¶
func (endpoints CustomEndpoints) GetRegion(region string) *CustomRegion
GetRegion returns the custom region or nil when no such custom endpoints are defined for this region
func (CustomEndpoints) GetURL ¶
func (endpoints CustomEndpoints) GetURL(region, serviceType string) string
GetURL returns the custom region or nil when no such custom endpoints are defined for this region
type CustomRegion ¶
type CustomRegion struct { Region string `yaml:"region"` Services CustomServices `yaml:"services"` TLSInsecureSkipVerify bool `yaml:"tls_insecure_skip_verify"` }
CustomRegion is a custom region endpoint that can be used to override the default AWS regions
type CustomService ¶
type CustomService struct { Service string `yaml:"service"` URL string `yaml:"url"` TLSInsecureSkipVerify bool `yaml:"tls_insecure_skip_verify"` }
CustomService is a custom service endpoint that can be used to override the default AWS endpoints.
type CustomServices ¶
type CustomServices []*CustomService
CustomServices is a collection of custom service endpoints that can be used to override the default AWS endpoints.
func (CustomServices) GetService ¶
func (services CustomServices) GetService(serviceType string) *CustomService
GetService returns the custom region or nil when no such custom endpoints are defined for this region
type DisableDeletionProtection ¶
type DisableDeletionProtection struct { RDSInstance bool `yaml:"RDSInstance"` EC2Instance bool `yaml:"EC2Instance"` CloudformationStack bool `yaml:"CloudformationStack"` ELBv2 bool `yaml:"ELBv2"` QLDBLedger bool `yaml:"QLDBLedger"` }
DisableDeletionProtection is a collection of feature flags that can be used to disable deletion protection for certain resource types. This is left over from the AWS Nuke tool and is deprecated. It was left to make transition to the library and ekristen/aws-nuke@v3 easier for existing users. Deprecated: Use Settings instead. Will be removed in 4.x
type FeatureFlags ¶
type FeatureFlags struct { DisableDeletionProtection DisableDeletionProtection `yaml:"disable-deletion-protection"` DisableEC2InstanceStopProtection bool `yaml:"disable-ec2-instance-stop-protection"` ForceDeleteLightsailAddOns bool `yaml:"force-delete-lightsail-addons"` }
FeatureFlags is a collection of feature flags that can be used to enable or disable certain features of the nuke This is left over from the AWS Nuke tool and is deprecated. It was left to make the transition to the library and ekristen/aws-nuke@v3 easier for existing users. Deprecated: Use Settings instead. Will be removed in 4.x