I am trying to attach a listener rule to the listener using CFT.
Here is my code
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The template for application load balancer.",
"Parameters": {
"targetGroupArn": {
"Type": "String"
},
"albListenerArn": {
"Type": "String"
},
"priority": {
"Type": "Number"
}
},
"Resources": {
"listenerRule": {
"Type": "AWS::ElasticLoadBalancingV2::ListenerRule",
"Properties": {
"Actions": [
{
"TargetGroupArn": {
"Ref": "targetGroupArn"
},
"Type": "forward"
}
],
"Conditions": [
{
"Field": "path-pattern",
"PathPatternConfig": {
"Values": [
"/test/*"
]
}
}
],
"ListenerArn": {
"Ref": "albListenerArn"
},
"Priority": {
"Ref": "priority"
}
}
}
},
"Outputs": {
"arn": {
"Description": "The ARN of the listenerRule.",
"Value": {
"Ref": "listenerRule"
}
},
"IsDefault": {
"Description": "Indicates whether this is the default rule.",
"Value": {
"Fn::GetAtt": [
"listenerRule",
"IsDefault"
]
}
}
}
}
Error which I am receiving is
Resource handler returned message: "Invalid request provided: AWS::ElasticLoadBalancingV2::ListenerRule Validation exception" (RequestToken: d2fc5cc4-3sdsdsda6b-8b46ad61dde, HandlerErrorCode: InvalidRequest)
Please help with this