Closed
Description
Description:
I'd like to selectively create a custom domain for an API, based on a condition. This currently fails with:
Custom Domains only works if both DomainName and CertificateArn are provided.
Steps to reproduce:
Resources:
MyApi:
Type: AWS::Serverless::Api
Properties:
EndpointConfiguration:
Type: EDGE
Domain: !If [UseCustomDomain, !Ref "AWS::NoValue", !Ref "AWS::NoValue"]
Parameters:
TemporaryStack:
Type: String
Default: "FALSE"
AllowedValues:
- "FALSE"
- "TRUE"
Description: Specify "TRUE" if the stack is for a temporary branch.
Conditions:
UseCustomDomain: !Equals
- !Sub "${TemporaryStack}"
- "FALSE"
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS:
macOS Catalina
- If using SAM CLI,
sam --version
:SAM CLI, version 1.24.0
- AWS region:
eu-west-1