We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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"
macOS Catalina
sam --version
SAM CLI, version 1.24.0
eu-west-1
The text was updated successfully, but these errors were encountered:
Reproduced. The Domain property in SAM currently does not support intrinsics.
Domain
Sorry, something went wrong.
This is a recurring issue around conditional attributes. See #1435 and #1955
You might be able to get this to work by adding AWS::LanguageExtensions to Transform as such:
AWS::LanguageExtensions
Transform
Transform: - AWS::LanguageExtensions - AWS::Serverless-2016-10-31
AWS::LanguageExtensions resolves intrinsic functions if the value is known when Transforms are run.
See #2533 for more information.
Closing in favor of #2533.
No branches or pull requests
Description:
I'd like to selectively create a custom domain for an API, based on a condition. This currently fails with:
Steps to reproduce:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
macOS Catalina
sam --version
:SAM CLI, version 1.24.0
eu-west-1
The text was updated successfully, but these errors were encountered: