【发布时间】:2019-11-07 09:20:42
【问题描述】:
根据环境,我正在尝试为变量设置 URL:它暂存我的 URL 应该是 https://staging.DNHostedZoneName ,如果 prod - 它应该只是 https://DNSHostedZoneName:
这是我的情况:
Conditions:
IsEnvProd: Fn::Equals [ !Ref Env, 'prod' ]
IsEnvStage: Fn::Equals [ !Ref Env, 'stage' ]
这里是它被评估的地方:
Environment:
- Name: NODE_ENV
Value: !Ref NodeEnv
- Fn::If:
- IsEnvStage
- Name: CORE_URL
Value:
Fn::Join:
- ""
- - "https://"
- "staging"
- "."
- !Ref DnsHostedZoneName
- Name: NCVCORE_URL
Value:
Fn::Join:
- ""
- - "https://"
- !Ref DnsHostedZoneName
我收到以下错误:
Template format error: Conditions can only be boolean operations on parameters and other conditions
【问题讨论】: