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

feat(aws-route53-targets): Support for Elastic Beanstalk environment URLs #16305

Merged
merged 18 commits into from
Oct 28, 2021

Conversation

ryparker
Copy link
Contributor

@ryparker ryparker commented Aug 31, 2021

Summary

This PR adds a new Route53 target ElasticBeanstalkEnvironmentTarget for creating RecordSets that target Elastic Beanstalk environment URLs.

E.g.

const ebsEnvironmentUrl = 'mysampleenvironment.xyz.us-east-1.elasticbeanstalk.com';

new route53.ARecord(this, 'AliasRecord', {
	zone,
    target: route53.RecordTarget.fromAlias(new alias.ElasticBeanstalkEnvironmentTarget(ebsEnvironmentUrl)),
});

How to find your Elastic Beanstalk environment URL

Fixes: #3206


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Aug 31, 2021

@peterwoodworth peterwoodworth added p1 effort/medium Medium work item – several days of effort contribution/core This is a PR that came from AWS. labels Sep 1, 2021
@RomainMuller RomainMuller force-pushed the master branch 2 times, most recently from 924c117 to ebfd5f2 Compare September 29, 2021 13:07
@ryparker ryparker requested a review from njlynch October 7, 2021 22:23
}

const dnsName = this.environmentEndpoint;
const region = cdk.Fn.select(2, cdk.Fn.split('.', dnsName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not allowing Tokens (above), then this can be a simple dnsName.split instead of the Fn.split.

@njlynch njlynch added the pr/do-not-merge This PR should not be merged at this time. label Oct 12, 2021
Copy link
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tentative approval.

I'll let you decide if you have the time to support Tokens here, which is definitely something we should eventually support for this class, or if we can add it in a follow-up sometime later.

@njlynch njlynch removed the pr/do-not-merge This PR should not be merged at this time. label Oct 28, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: d19d968
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit bc07cb0 into master Oct 28, 2021
@mergify mergify bot deleted the add-elasticbeanstalk-record-target branch October 28, 2021 11:10
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…URLs (aws#16305)

## Summary

This PR adds a new Route53 target `ElasticBeanstalkEnvironmentTarget` for creating RecordSets that target Elastic Beanstalk environment URLs.

E.g.

```ts
const ebsEnvironmentUrl = 'mysampleenvironment.xyz.us-east-1.elasticbeanstalk.com';

new route53.ARecord(this, 'AliasRecord', {
	zone,
    target: route53.RecordTarget.fromAlias(new alias.ElasticBeanstalkEnvironmentTarget(ebsEnvironmentUrl)),
});
```

[How to find your Elastic Beanstalk environment URL](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-beanstalk-environment.html#routing-to-beanstalk-environment-get-domain-name)

Fixes: aws#3206


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53-targets contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Route53: ElasticBeanstalk Application as AliasRecordTarget to Route53
5 participants