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

support routing policy setting for ARecord class #4391

Open
geekybaiyi opened this issue Oct 7, 2019 · 18 comments
Open

support routing policy setting for ARecord class #4391

geekybaiyi opened this issue Oct 7, 2019 · 18 comments
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@geekybaiyi
Copy link

Please support routing policy parameters for ARecord in CDK.

Not all parameters are supported in CDK Route53 module currently. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-recordset.html

any plan to support those in the future?


This is a 🚀 Feature Request

@geekybaiyi geekybaiyi added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2019
@NGL321 NGL321 added @aws-cdk/aws-route53 Related to Amazon Route 53 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2019
@NGL321
Copy link
Contributor

NGL321 commented Oct 7, 2019

Hi @geekybaiyi,

Thank you for submitting the request! From what I could tell in the docs, it looks like all the parameters supported in Cloudformation are supported in the CDK.

Could you tell me which parameters you are missing?

@geekybaiyi
Copy link
Author

how about these ?
"Failover" , "GeoLocation", "MultiValueAnswer", "Region", "SetIdentifier", "Weight"

@nmussy
Copy link
Contributor

nmussy commented Oct 8, 2019

Indeed, they are missing from the L2 ResourdSet construct. You can access them right now via the CfnRecordSet resource, for example:

const zone = HostedZone.fromLookup(this, 'zone', {domainName: 'example.com'});

const record = new ARecord(this, 'A', {
    zone,
    target: RecordTarget.fromIpAddresses('1.1.1.1'),
    recordName: 'www',
});

const recordSet = (record.node.defaultChild as CfnRecordSet);
recordSet.failover = 'PRIMARY';

@NGL321 NGL321 added in-progress This issue is being actively worked on. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Oct 17, 2019
@geekybaiyi
Copy link
Author

I noticed an PR is created associated with this issue.
any idea when it would be merged? thx!

@shivlaks shivlaks added the effort/medium Medium work item – several days of effort label Jan 29, 2020
@shivlaks shivlaks added the p1 label Aug 26, 2020
@itaykat
Copy link

itaykat commented Aug 26, 2020

How can one reach CfnRecordSet from an ApplicationLoadBalancedFargateService object?

@NGL321 NGL321 assigned njlynch and unassigned shivlaks Jan 25, 2021
@ryanvaloris
Copy link

ryanvaloris commented Feb 19, 2021

The CfnRecordSet seems to be missing the Latency routing policy as well. Is there a timeline for when that will be added?

Additionally, the policies also appear to be configurable for more than just A Records. CNAMEs for example allow this policy.

@jdnz
Copy link

jdnz commented Mar 12, 2021

@ryanvaloris you can enable latency routing by setting the region and setIdentifier of the CfnRecordSet, e.g.

const record = new ARecord(this, 'apiA', {
    zone: zone,
    target: target,
    recordName: apiName,
});

const recordSet = (record.node.defaultChild as CfnRecordSet);
recordSet.region = region;
recordSet.setIdentifier = region;

@theGreatHeisenberg
Copy link

Is there a way to create cross region Arecord or CNAME? I want to implement latency based routing where I will creating CNAMEs for latency based routing.

parentZone CNAME IADZone
parentZone CNAME PDXZone

Where parentZone, IADZone, and PDXZone are all in different AWS accounts . Is there a way to create this via CDK? Possibly using CrossAccountZoneDelegationRecord?

@njlynch njlynch removed the in-progress This issue is being actively worked on. label Jun 29, 2021
@njlynch njlynch removed their assignment Jun 29, 2021
@eugene-screenmeet
Copy link

@ryanvaloris you can enable latency routing by setting the region and setIdentifier of the CfnRecordSet, e.g.

const record = new ARecord(this, 'apiA', {
    zone: zone,
    target: target,
    recordName: apiName,
});

const recordSet = (record.node.defaultChild as CfnRecordSet);
recordSet.region = region;
recordSet.setIdentifier = region;

You the real MVP

@shadogar
Copy link

We shouldn't have to be going into the L1 construct like this. The L2 should support all of the routing policies. Is this ticket still on the roadmap? I see it's been around for 3 years now

@andremmfaria
Copy link

Bumping this feature request. This L2 construct would be awesome to have.

@UriConMur
Copy link

UriConMur commented Aug 22, 2022

Hi, Im expecting to be able to setup the type as weighted and Im doing it this way:

const aRecord = new ARecord(this.scope, resourceId, {
      zone: this.hostedZone,
      target: RecordTarget.fromAlias(new CloudFrontTarget(distribution)),
      recordName: domain,
    })
    const recordSet = aRecord.node.defaultChild as CfnRecordSet
    recordSet.setIdentifier = 'UniqueWeightedIdentifier' // this needs to be unique from all your other A Weighted Records
    recordSet.weight = 200

And it works fine, it will be easier of we can add this using constructor props.

@mvs5465
Copy link

mvs5465 commented Mar 14, 2023

Bump on this request but for CNAME records.

@renatoargh
Copy link

It's already more than 2 years since jdnz amazing answer... do we know if there's already a nicer way to support latency-based A records from CDK? 👀

@badmintoncryer
Copy link
Contributor

badmintoncryer commented Jan 18, 2024

Hi there.
I've implemented weighted routing (#28705) for RecordSet class, so you can configure it easily from L2 now.
It is possible to set not only A records but all other types of records as well.

Additionally, I plan to implement features such as latency based routing (#28723) and IP-based routing(#28833) or so.

I believe it will still take some time before the merge, but please wait a little longer.

@flaxpanda
Copy link

Hi there. I've implemented weighted routing (#28705) for RecordSet class, so you can configure it easily from L2 now. It is possible to set not only A records but all other types of records as well.

Additionally, I plan to implement features such as latency based routing (#28723) and IP-based routing(#28833) or so.

I believe it will still take some time before the merge, but please wait a little longer.

thanks @badmintoncryer!

@pahud pahud added p2 and removed p1 labels Jun 11, 2024
Copy link

This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue.

@github-actions github-actions bot added p1 and removed p2 labels Jun 16, 2024
@wladyslawczyzewski
Copy link

hi there. I have already implemented the Failover routing strategy - but haven't published it yet as it has some dependencies to health checks on which I'm working on rn #9481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.