Skip to content

Commit

Permalink
fix(config): check if filters is nil before resolving deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Sep 26, 2024
1 parent c0b844c commit f69addb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ func (c *Config) Filters(accountID string) (filter.Filters, error) {
// new resource type.
func (c *Config) ResolveDeprecations() error {
for _, a := range c.Accounts {
// Note: if there are no filters defined, then there's no substitution to perform.
if a.Filters == nil {
return nil
}

for resourceType, resources := range a.Filters {
replacement, ok := c.Deprecations[resourceType]
if !ok {
Expand Down

0 comments on commit f69addb

Please sign in to comment.