Skip to content

Commit

Permalink
Add CloudFormationProvisionedProduct to exceptions (#3481)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekluever authored Jul 9, 2024
1 parent 19b13e2 commit 39d6fee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cfnlint/rules/functions/GetAttFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self):
self._resource_type_exceptions = [
"AWS::CloudFormation::CustomResource",
"AWS::CloudFormation::Stack",
"AWS::ServiceCatalog::CloudFormationProvisionedProduct",
]

def validate(
Expand Down
9 changes: 9 additions & 0 deletions test/unit/rules/functions/test_getatt_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def template():
"MySecurityGroup": {"Type": "AWS::EC2::SecurityGroup"},
"MyCustomResource": {"Type": "Custom::CustomResource"},
"MySubTemplate": {"Type": "AWS::CloudFormation::Stack"},
"MyProvisionedProduct": {
"Type": "AWS::ServiceCatalog::CloudFormationProvisionedProduct"
},
},
}

Expand All @@ -49,6 +52,12 @@ def template():
{"format": "AWS::EC2::VPC.Id"},
[],
),
(
"Valid GetAtt to a provisioned product ",
["MyProvisionedProduct", "Outputs.VpcId"],
{"format": "AWS::EC2::VPC.Id"},
[],
),
(
"Valid GetAtt because of exception",
["MyBucket", "Arn"],
Expand Down

0 comments on commit 39d6fee

Please sign in to comment.