Skip to content
New issue

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

In Annotations Framework, is it possible to set up a custom domain for an HttpApi in your serverless.template? #1703

Open
ashishdhingra opened this issue Mar 20, 2024 Discussed in #1681 · 1 comment
Labels
annotations feature-request A feature should be added or improved. p2 This is a standard priority issue queued

Comments

@ashishdhingra
Copy link
Contributor

ashishdhingra commented Mar 20, 2024

Discussed in #1681

Originally posted by lorenh February 26, 2024
We are used to setting up custom domains for our REST APIs in the aspnetcore webapi-style projects directly in our serverless templates using something like this (where all the !Ref's are passed in as parameters). Now I'm experimenting with the "HttpApi" and don't see the equivalent Domain settings under it as I saw under "Api"

:
Globals:
  Api:
    Domain:
      DomainName: !Ref DomainName
      CertificateArn: !Ref CertificateArn
      EndpointConfiguration: EDGE
      Route53:
        HostedZoneName: !Ref HostedZoneName

HttpApi appears to only support AccessLogSettings, Auth, StageVariables and Tags. I guess this is more of a SAM or CloudFormation question, but was hoping someone out here has figured out a way to configure it directly in your serverless template.

:
Globals:
  HttpApi:
    Domain:  <=====   ERROR
      DomainName: !Ref DomainName
      CertificateArn: !Ref CertificateArn
      EndpointConfiguration: EDGE
      Route53:
        HostedZoneName: !Ref HostedZoneName
@ashishdhingra ashishdhingra added feature-request A feature should be added or improved. needs-review annotations labels Mar 20, 2024
@ashishdhingra
Copy link
Contributor Author

Commented below on discussion:

Based on discussion with the team, HttpApi does support Domain here in CloudFormation. But looks like we don't support configuring that through the [HttpApi] attribute. I would convert this discussion to feature request to get it reviewed with the team since we also might think to investigate other attributes to support (not just Domain).

@ashishdhingra ashishdhingra added p2 This is a standard priority issue queued and removed needs-review labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations feature-request A feature should be added or improved. p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

1 participant