mirror of
https://github.com/inspec/inspec
synced 2024-11-26 06:30:26 +00:00
Ignore resource overwrite warnings if they are aws resources
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
73f2f50e78
commit
d96fbb8cfc
1 changed files with 4 additions and 1 deletions
|
@ -147,7 +147,10 @@ module Inspec
|
|||
end
|
||||
|
||||
# rubocop:enable Lint/NestedMethodDefinition
|
||||
if __resource_registry.key?(name)
|
||||
|
||||
# Warn if a resource pack is overwriting a core resource.
|
||||
# Suppress warning if the resource is an AWS resource, see #3822
|
||||
if __resource_registry.key?(name) && !name.start_with?('aws_')
|
||||
Inspec::Log.warn("Overwriting resource #{name}. To reference a specific version of #{name} use the resource() method")
|
||||
end
|
||||
__resource_registry[name] = cl
|
||||
|
|
Loading…
Reference in a new issue