我正在CloudFormation模板中使用Load Balancer创建并附加EC2实例。这里是Load Balancer资源中的实例。
"Instances" : [
"Fn::If": ["AttachLoadBalancerToServer1",
{
"Fn::GetAtt": [ "ServerStack1", "Outputs.Server1" ],
},
{
"Fn::If": ["AttachLoadBalancerToServer2",
{
"Fn::GetAtt": [ "ServerStack2", "Outputs.Server1" ],
},""
]
},""
]
],
Run Code Online (Sandbox Code Playgroud)
我想在此使用if if else模式:
if(AttachLoadBalancerToServer1){
"Instances" = "Fn::GetAtt": [ "ServerStack1", "Outputs.Server1" ],
}
else if(AttachLoadBalancerToServer2){
"Instances" = "Fn::GetAtt": [ "ServerStack2", "Outputs.Server1" ],
}
else{
"Instances" = "",
}
Run Code Online (Sandbox Code Playgroud)
有谁可以帮助我在此模板中编写IF ELSEIF结构?我能够添加一个条件,但无法找到如何在一个条件内使用第二个条件。
谢谢
我收到以下错误,有人可以描述吗?我使用Laravel 4和composer作为依赖管理器.我尝试了几次这样做,在各种论坛上搜索并没有解决这个问题.如果有人能够研究这个问题并建议解决方案,我将不胜感激.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel v1.3.7 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel 1.3.2 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.0 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.1 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.3 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.4 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by …Run Code Online (Sandbox Code Playgroud)