fn :: importValue在简短的符号中不喜欢fn :: sub
为什么以下格式不正常出现错误“ fn :: importValue中的属性必须是返回字符串的字符串或函数”?
Source: !Join [":", [!ImportValue [!Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionArn"], !ImportValue [!Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionAlias"]]]
但是,如果我将其重写为:
Source: !Join
- ":"
- - Fn::ImportValue: !Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionArn"
- Fn::ImportValue: !Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionAlias"
Why is following format not working giving error "the attribute in Fn::ImportValue must be a string or a function that returns a string"?
Source: !Join [":", [!ImportValue [!Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionArn"], !ImportValue [!Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionAlias"]]]
but it works if I rewrite it as:
Source: !Join
- ":"
- - Fn::ImportValue: !Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionArn"
- Fn::ImportValue: !Sub "${ProductEnvironment}-${ProductName}-IngressGreengrassProxyFunctionAlias"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AWS没有提供其内部实现的详细信息,为什么它们以这种方式实现
importValue
。The docs explain:
AWS does not provide details of its internal implementations, why they implemented
ImportValue
this way.