-
Couldn't load subscription status.
- Fork 4.3k
feat(route53): add cidrRoutingConfig property #34301
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
Changes from 13 commits
7651ea7
681a4e7
205317e
13edc49
ccadb76
cb22653
7606499
e956917
49a37ea
39df4fe
6b1101a
43f071f
c89aebf
0cd648a
84b1aaa
43a8858
b503681
c4b51e5
a175c61
fd37c6a
1fe0fda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| { | ||
| "Resources": { | ||
| "HostedZoneDB99F866": { | ||
| "Type": "AWS::Route53::HostedZone", | ||
| "Properties": { | ||
| "Name": "cdk.test." | ||
| } | ||
| }, | ||
| "CidrCollection": { | ||
| "Type": "AWS::Route53::CidrCollection", | ||
| "Properties": { | ||
| "Locations": [ | ||
| { | ||
| "CidrList": [ | ||
| "192.168.1.0/24" | ||
| ], | ||
| "LocationName": "test_location" | ||
| } | ||
| ], | ||
| "Name": "test-collection" | ||
| } | ||
| }, | ||
| "CidrRoutingConfig2AF5DEDB": { | ||
| "Type": "AWS::Route53::RecordSet", | ||
| "Properties": { | ||
| "CidrRoutingConfig": { | ||
| "CollectionId": { | ||
| "Fn::GetAtt": [ | ||
| "CidrCollection", | ||
| "Id" | ||
| ] | ||
| }, | ||
| "LocationName": "test_location" | ||
| }, | ||
| "HostedZoneId": { | ||
| "Ref": "HostedZoneDB99F866" | ||
| }, | ||
| "Name": "cdk.test.", | ||
| "ResourceRecords": [ | ||
| "1.2.3.4" | ||
| ], | ||
| "SetIdentifier": "test", | ||
| "TTL": "1800", | ||
| "Type": "A" | ||
| } | ||
| } | ||
| }, | ||
| "Parameters": { | ||
| "BootstrapVersion": { | ||
| "Type": "AWS::SSM::Parameter::Value<String>", | ||
| "Default": "/cdk-bootstrap/hnb659fds/version", | ||
| "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
| } | ||
| }, | ||
| "Rules": { | ||
| "CheckBootstrapVersion": { | ||
| "Assertions": [ | ||
| { | ||
| "Assert": { | ||
| "Fn::Not": [ | ||
| { | ||
| "Fn::Contains": [ | ||
| [ | ||
| "1", | ||
| "2", | ||
| "3", | ||
| "4", | ||
| "5" | ||
| ], | ||
| { | ||
| "Ref": "BootstrapVersion" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { App, Stack, StackProps } from 'aws-cdk-lib'; | ||
| import { Construct } from 'constructs'; | ||
| import * as route53 from 'aws-cdk-lib/aws-route53'; | ||
| import { IntegTest } from '@aws-cdk/integ-tests-alpha'; | ||
|
|
||
| class TestStack extends Stack { | ||
| constructor(scope: Construct, id: string, props?: StackProps) { | ||
| super(scope, id, props); | ||
|
|
||
| const zone = new route53.PublicHostedZone(this, 'HostedZone', { | ||
| zoneName: 'cdk.test', | ||
| }); | ||
|
|
||
| const cidrCollection = new route53.CfnCidrCollection(this, 'CidrCollection', { | ||
| name: 'test-collection', | ||
| locations: [{ | ||
| cidrList: ['192.168.1.0/24'], | ||
| locationName: 'test_location', | ||
| }], | ||
| }); | ||
|
|
||
| new route53.ARecord(this, 'CidrRoutingConfig', { | ||
| zone: zone, | ||
| target: route53.RecordTarget.fromIpAddresses('1.2.3.4'), | ||
| setIdentifier: 'test', | ||
| cidrRoutingConfig: route53.CidrRoutingConfig.new({ | ||
| collectionId: cidrCollection.attrId, | ||
| locationName: 'test_location', | ||
| }), | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| const app = new App(); | ||
| const stack = new TestStack(app, 'CidrRoutingConfig'); | ||
|
|
||
| new IntegTest(app, 'CidrRoutingConfigInteg', { | ||
| testCases: [stack], | ||
| }); | ||
| app.synth(); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this line.