{
"Parameters": {
"FirstSubnet": {
"Type": "String"
},
"SecondSubnet": {
"Type": "String"
},
"ELBType": {
"Type": "String"
},
"ELBIpAddressType": {
"Type": "String"
}
},
"Resources": {
"loadBalancer": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"SubnetMappings": [
{
"AllocationId": {
"Fn::GetAtt": [
"FirstEIP",
"AllocationId"
]
},
"SubnetId": {
"Ref": "FirstSubnet"
}
},
{
"AllocationId": {
"Fn::GetAtt": [
"SecondEIP",
"AllocationId"
]
},
"SubnetId": {
"Ref": "SecondSubnet"
}
}
],
"Type": {
"Ref": "ELBType"
},
"IpAddressType": {
"Ref": "ELBIpAddressType"
}
}
},
"FirstEIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc"
}
},
"SecondEIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc"
}
}
}
}