[英]Fn If in cf template and executing a command
I would greatly appreciate your help on this. 非常感谢您的帮助。 I am trying inside a AWS CF template to run a command when the env=QA
当env = QA时,我正在尝试在AWS CF模板中运行命令
This is what I'm trying to achieve but there is no way 这是我要实现的目标,但是没有办法
"Conditions" : {
"CreateQaResources" : {"Fn::Equals" : [{"Ref" : "Env"}, "AwsQaUs"]}
},
and then 接着
"Fn::If": [
"CreateQaResources",
{
"echo \"10.0.0.0 DOMAIN.COMPANY.com \" >>/etc/hosts \n",
},
{
"Ref" : "Env::AwsQaUs"
}
]
Can you please tell me where is my mistake? 你能告诉我我的错误在哪里吗?
Thank you 谢谢
Everything seems to be okay, but it would be nice to see more of your template to make sure it looks right. 一切似乎都还不错,但是很高兴看到更多模板来确保它看起来正确。 Are you getting some sort of error or is the end result just not what you're hoping?
您是否遇到某种错误,或者最终结果不是您所希望的? I realize this isn't an answer.
我知道这不是答案。 Apparently I don't have permission to add comments, yet.
显然我还没有添加评论的权限。 Sorry!
抱歉!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.