Getting error when using !GetAtt for SecurityGroups Property of type AWS::AutoScaling::LaunchConfiguration
See original GitHub issuecfn-lint version: 0.29.6
Description of issue. We are getting the following error:
cfnlint: E3008 Property “SecurityGroups” has no valid Fn::GetAtt options at Resources/TempLaunchConfig/Properties/SecurityGroups/0/Fn::GetAtt
The correlating piece of the template is:
TestLaunchConfig:
Type: "AWS::AutoScaling::LaunchConfiguration"
Properties:
SecurityGroups:
- !GetAtt TempSecurityGroup.GroupId
We do realize that we can use !Ref TempSecurityGroup
, but because we have this in a lot of templates, we’d rather not change them all and continue using !GetAtt TempSecurityGroup.GroupId
as it’s supported by CloudFormation.
Relevant documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html#cfn-as-launchconfig-securitygroups
Related Issue: https://github.com/aws-cloudformation/cfn-python-lint/issues/888
Cfn-lint should support passing in a GroupId using !GetAtt for the SecurityGroups Property list. This template is valid and does deploy.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
@PatMyron The type is
AWS::EC2::SecurityGroup
. It is in the same template yes.@kbcaleb @PatMyron Thank you both for the speedy communication and fix!