Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cfnlint/rules/resources/CreationPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def validate(self, validator: Validator, dP: str, instance, schema):
return
resource_type = validator.context.resources[resource_name].type

# Fn::Select declares an all_types output, so the generic output-type
# check (see #4641) treats it as object-compatible. CloudFormation,
# however, rejects a bare Fn::Select here ("Expected an object") unless
# AWS::LanguageExtensions resolves it before deployment. See #4645.
function, _ = is_function(instance)
if (
function == "Fn::Select"
Expand Down
13 changes: 4 additions & 9 deletions src/cfnlint/rules/resources/updatepolicy/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def __init__(self) -> None:
)

def validate(self, validator: Validator, keywords: Any, instance: Any, schema: Any):
# Fn::Select declares an all_types output, so the generic output-type
# check (see #4641) treats it as object-compatible. CloudFormation,
# however, rejects a bare Fn::Select here ("Expected an object") unless
# AWS::LanguageExtensions resolves it before deployment. See #4645.
update_policy = instance.get("UpdatePolicy")
function, _ = is_function(update_policy)
if (
Expand All @@ -44,15 +48,6 @@ def validate(self, validator: Validator, keywords: Any, instance: Any, schema: A
rule=self,
instance=update_policy,
validator="type",
validator_value="object",
schema_path=[
"allOf",
0,
"then",
"properties",
"UpdatePolicy",
"type",
],
)
return

Expand Down
9 changes: 0 additions & 9 deletions test/unit/rules/resources/updatepolicy/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ def rule():
]
},
validator="type",
validator_value="object",
schema_path=[
"allOf",
0,
"then",
"properties",
"UpdatePolicy",
"type",
],
)
],
),
Expand Down
Loading