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

fix(route53): vpc region in template overridden by stack region #20530

Merged
merged 160 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from 157 commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
ac4f9e2
:adhesive_bandage: Respect vpc region when set
daschaa May 27, 2022
532ad40
Merge branch 'main' into hostedzone-vpc-region
daschaa Jun 2, 2022
db7aeba
chore: replace master with main wherever possible (#20590)
kaizencc Jun 2, 2022
eb6d6b0
docs(glue): refresh links for aws glue documentation (#20577)
daschaa Jun 2, 2022
11e2398
chore: update the contributing guide for post v1 maintenance mode (#2…
madeline-k Jun 2, 2022
6b2be86
feat(cfnspec): cloudformation spec v73.1.0 (backport #20587) (#20592)
mergify[bot] Jun 2, 2022
4aaf8c8
chore(release): 2.27.0
Jun 2, 2022
49614ac
feat(cfnspec): cloudformation spec v75.0.0 (#20605)
aws-cdk-automation Jun 3, 2022
fcf34cc
fix(core): property overrides sometimes don't work with intrinsics (#…
corymhall Jun 3, 2022
48fd66f
feat(lambda): Migrate away from NODEJS_10_X and NODEJS_12_X to NODEJS…
robertd Jun 3, 2022
569ab2e
feat(codebuild): adds report group type property (#20178)
daschaa Jun 3, 2022
ad52f6f
chore(deps): Bump awscli from 1.25.1 to 1.25.2 in /packages/@aws-cdk/…
dependabot[bot] Jun 6, 2022
3d3feed
feat(aws-ec2): control over VPC AZs (#20562)
philipmw Jun 6, 2022
b85ec4e
chore(servicediscovery): rename docs/test props (#20639)
kellertk Jun 7, 2022
ce42413
fix(lambda): deprecate Python3.6 (#19988) (#20647)
RomainMuller Jun 7, 2022
34a7af3
docs(lambda): close code block in addAlias, restore addEnvironment do…
huonw Jun 7, 2022
9298006
chore(aws-cdk): fix inaccurate hint text (#20640)
aubelscirclein Jun 7, 2022
d220e99
feat(core): allow specifying Docker build targets (#20654)
indrora Jun 7, 2022
3ccd7f0
chore(aws-rds): add Aurora MySQL 3.01.1 3.02.0 (#20632)
hacker65536 Jun 7, 2022
3b1b0d9
chore: clarify .Net core versions in contributing guide (#20612)
philipmw Jun 8, 2022
b4a2e22
chore(core): remove excess whitespace (#20664)
kaizencc Jun 8, 2022
27f5e6e
chore(cx-api): add missing documentation for feature flag (#20671)
kaizencc Jun 8, 2022
31a0820
chore: npm-check-updates && yarn upgrade (#20401)
aws-cdk-automation Jun 9, 2022
bc87e37
chore: fix THIRD_PARTY_LICENSES (#20687)
RomainMuller Jun 9, 2022
d79b58c
fix(iam): conditions in FederatedPrincipal should be optional (#20621)
cecheta Jun 9, 2022
9bdf5df
fix(servicecatalog): ProductStackHistory does not accept nested direc…
wanjacki Jun 9, 2022
00c24e9
docs(rds): Fix storage allocation units (#20692)
l0b0 Jun 10, 2022
9dced6f
chore(region-info): Register iso facts (#20699)
maafk Jun 10, 2022
893e6f4
chore(deps): Bump awscli from 1.25.2 to 1.25.7 in /packages/@aws-cdk/…
dependabot[bot] Jun 13, 2022
acdadfa
Add Textract support to AWS VpcEndpoint services (#20604)
J11522 Jun 13, 2022
793689f
chore: remove construct-import-order eslint rule (#20674)
madeline-k Jun 13, 2022
8534468
docs(secretsmanager): Updates example in secretsmanager code (#20672)
daschaa Jun 13, 2022
8e38b0e
feat(opensearchservice): When a Domain has enforceHttps true, set the…
SamStephens Jun 13, 2022
54d3d4e
fix(appsync): Create Lambda permission when using Lambda Authorizer(#…
cm-iwata Jun 13, 2022
2c113a7
fix(eks): add clusterLogging props to Fargate Cluster (#20707)
ranjith-jagadeesh Jun 13, 2022
d1c42c5
fix(core): RemovalPolicy.SNAPSHOT can be added to resources that do n…
kaizencc Jun 13, 2022
c40c93b
feat(ec2): allow the use of graviton3 processors (#20541)
gergnz Jun 13, 2022
c3fd2cd
chore(aws-rds): add doc references (#20720)
ahammond Jun 13, 2022
b9564d5
chore(core): IConstruct is passed to Names.uniqueId instead of Constr…
schabe77 Jun 13, 2022
e28b64f
fix(integ-runner): don't allow new legacy tests (#20614)
corymhall Jun 13, 2022
a3b46a9
feat(ecs-patterns): add ecs exec support (#18663)
LukvonStrom Jun 13, 2022
90352c8
feat(cloudwatch): add `addWidget` method in widget container classes …
flavioleggio Jun 14, 2022
29e026c
feat(ecs): add external network modes to ExternalTaskDefinition and T…
beezly Jun 14, 2022
5b77e27
fix(events): eventSourceName does not accept tokens (#20719)
keetonian Jun 14, 2022
85d3e17
chore(release): 2.28.0
Jun 14, 2022
9be9b99
fix(init-templates): unable to initialize typescript templates (#20752)
yamatatsu Jun 15, 2022
c5382b6
chore(release): 2.28.1
iliapolo Jun 15, 2022
c698a05
fix header
iliapolo Jun 15, 2022
0b985ce
one more header
iliapolo Jun 15, 2022
bba5383
feat(lambda): inline function code can exceed 4096 bytes (#20624)
seyeong Jun 14, 2022
2749269
feat(events-targets): Add DLQ support for SNS target (#20062)
jumic Jun 14, 2022
830e67c
docs(synthetics): update inline code limitation (#20740)
s12v Jun 14, 2022
893b2b9
fix(core): CfnMapping values cannot be used in other stacks (#20616)
comcalvi Jun 15, 2022
d098106
fix(codepipeline): cannot deploy pipeline stack with crossAccountKeys…
TheRealAmazonKendra Jun 15, 2022
a8ea8bb
fix(iam): add `defaultPolicyName` to prevent policies overwriting eac…
comcalvi Jun 15, 2022
855a9f3
feat(pipelines): add support for caching to codebuild steps (#20533)
Hi-Fi Jun 15, 2022
a01e5ce
fix(autoscaling): osType is wrong when using CloudformationInit with …
BDeus Jun 16, 2022
ca66b48
docs(lambda): Fixed consecutive "when" (#20761)
WinterYukky Jun 16, 2022
7489af4
fix(iam): duplicate PolicyStatements lead to too many overflow polici…
rix0rrr Jun 16, 2022
67541d2
feat(secretsmanager): exclude characters for hosted rotation (#20768)
jogold Jun 16, 2022
c31a25a
feat(route53): replace existing record sets (#20416)
jogold Jun 16, 2022
85925a3
fix(route53): improve fromHostedZoneId error message (#20755)
peterwoodworth Jun 16, 2022
cfe282d
fix(core): Durations in the expected unit are not tested for integer-…
scanlonp Jun 17, 2022
6618525
feat(servicediscovery): add hostedzoneid as attribute to namespace (#…
peterwoodworth Jun 20, 2022
17b4b56
fix(events-targets): cloudwatch logs requires specific input template…
corymhall Jun 20, 2022
04f33ba
feat(aws-eks): allow the use of graviton3 processors (#20543)
gergnz Jun 20, 2022
fdaf60e
Update yarn-upgrade.yml (#20791)
iliapolo Jun 21, 2022
df3b136
feat(apigateway): Add LambdaIntegrationOptions to LambdaRestApi (#17065)
laurelmay Jun 22, 2022
bbf29ef
feat(cfnspec): cloudformation spec v76.0.0 (#20726)
aws-cdk-automation Jun 22, 2022
be21eb7
chore(release): 2.29.0
Jun 22, 2022
b8b9978
fix(pipelines): 'ConfirmPermissionsBroadening' uses wrong node versio…
rix0rrr Jun 24, 2022
e291eef
chore(release): 2.29.1
MrArnoldPalmer Jun 24, 2022
33c2da1
chore(deps): Bump awscli from 1.25.7 to 1.25.12 in /packages/@aws-cdk…
dependabot[bot] Jun 23, 2022
60e5ff6
fix(eks): revert shell=True and allow public ecr to work (#20724)
harshadbhatia Jun 27, 2022
2c689a3
chore(deps): Bump awscli from 1.25.12 to 1.25.17 in /packages/@aws-cd…
dependabot[bot] Jun 27, 2022
4c2f1fc
fix(apigateway): Explicitly test for undefined instead of falsey for …
flemjame-at-amazon Jun 27, 2022
ab6b95f
feat(rds): add missing aurora postgres versions (#20830)
wilhen01 Jun 27, 2022
44741e4
feat(appmesh): ipv6 support for app mesh (#20766)
AKBarcenas Jun 28, 2022
2500604
chore: advertise construct hub on the readme (#20844)
kaizencc Jun 28, 2022
133596b
feat(lambda): grant function permissions to an AWS organization (#19975)
kaizencc Jun 28, 2022
0b38c4f
feat(cognito): make `grant()` available on `IUserPool` (#20799)
jogold Jun 29, 2022
fe0472d
chore(docdb): non-TS examples fail to build due to the wrong enum bei…
josephedward Jun 30, 2022
2901251
chore(cfnspec): new libraries do not conform to pkglint (#20900)
rix0rrr Jun 30, 2022
2068c9a
fix(secretsmanager): SecretRotation app does not set DeletionPolicy (…
rix0rrr Jun 30, 2022
b7fd8b8
feat(iam): PolicyStatements can be frozen (#20911)
rix0rrr Jun 30, 2022
6c7e17c
docs(codepeline): ECR cannot trigger on multiple tags (#20897)
rix0rrr Jun 30, 2022
1e69401
docs(pipelines): describe how to work around policy size errors (#20569)
rix0rrr Jun 30, 2022
38cd247
chore(cfnspec): Add coverage directory to npmignore (backport #20016)…
mergify[bot] Jun 30, 2022
5c8dd14
refactor: update enum types to remove duplicate member values (backpo…
mergify[bot] Jun 30, 2022
036d8cd
chore(release): 2.30.0
Jul 1, 2022
4bd5bce
Update CHANGELOG.v2.md
rix0rrr Jul 1, 2022
eb5fc48
feat(autoscaling): step scaling policy supports estimatedInstanceWarm…
BDeus Jul 1, 2022
42198c7
fix: custom resources log sensitive `ResponseURL` field (#20899)
rix0rrr Jul 1, 2022
41df699
feat(s3): Event Bridge notification can be enabled after the bucket i…
otaviomacedo Jul 1, 2022
0294ef9
fix(cloudfront): fromOriginAccessIdentityName is a misnomer (#20772)
dbartholomae Jul 1, 2022
3a99d20
Remove redundancy to improve clarity (#20963)
GuyDev1 Jul 2, 2022
46013cb
chore(deps): Bump awscli from 1.25.17 to 1.25.22 in /packages/@aws-cd…
dependabot[bot] Jul 4, 2022
e69e14e
fix(cli): standard log messages are sent to stderr when CI=true (#20957)
corymhall Jul 4, 2022
fe1701a
chore: a couple more places where `ResponseURL` is logged (#20977)
rix0rrr Jul 4, 2022
44ff695
feat(cfnspec): cloudformation spec v78.1.0 (#20952)
aws-cdk-automation Jul 4, 2022
50f012a
docs: clarify commit prefixes (#20910)
rix0rrr Jul 4, 2022
f5c72e4
chore: make `does-not-exist.json` actually not exist (#20986)
rix0rrr Jul 4, 2022
47bfc7e
refactor: remove more duplicate enum values (#20982)
rix0rrr Jul 4, 2022
1568aae
fix(stepfunctions-tasks): SqsSendMessage is missing KMS permissions (…
jesterhazy Jul 5, 2022
7bb58af
docs: explain procedure for rotating a SecretsManager Secret (#20989)
rix0rrr Jul 5, 2022
9f37a5a
docs(pipelines): explain lookup-role assumption error (#20999)
rix0rrr Jul 5, 2022
015429d
docs: fix wrong annotation used in example (#20964)
GuyDev1 Jul 5, 2022
3c26443
feat(batch): add secrets props to job definition (#20871)
yoshizawa56 Jul 5, 2022
2419a28
docs(opensearch): add example for token based import (#20915)
akleiber Jul 5, 2022
ee52967
chore: fix ci=true integ tests (#21000)
rix0rrr Jul 5, 2022
266f843
feat(dynamodb): imported tables always grant permissions for indexes …
i05nagai Jul 5, 2022
13c1e6f
fix(route53): cannot delete existing alias record (#20858)
jogold Jul 5, 2022
25e2f9e
chore(deps): Bump parse-url from 6.0.0 to 6.0.2 (#21005)
dependabot[bot] Jul 6, 2022
ed621df
chore: add `cdklabs` scope to our analytics (#20981)
iliapolo Jul 6, 2022
f296b8c
feat(aws-s3): create default bucket policy when required (under featu…
corymhall Jul 6, 2022
46f7c27
fix(eks): latest `AlbController` version isn't compatible with the ch…
adriantaut Jul 6, 2022
5cf21d5
feat(ec2): add additional instance type classes (#20972)
jumic Jul 6, 2022
4f44a4b
feat(elbv2) expose connection_termination attribute on network target…
michaeldrey Jul 6, 2022
8a9eac5
docs: clarify cfnInclude parameters (#21001)
peterwoodworth Jul 6, 2022
979c080
chore(release): 2.31.0
Jul 6, 2022
ec54a90
fix(custom-resources): Custom resource provider framework not passing…
comcalvi Jul 8, 2022
d8c3133
chore(release): 2.31.1
comcalvi Jul 8, 2022
4ec4087
changelog format
comcalvi Jul 8, 2022
004725b
feat(ec2): expose interface endpoint service shortname (#20965)
hoegertn Jul 6, 2022
faa45da
feat(codebuild): add support for new codebuild images (#20992)
daschaa Jul 6, 2022
ad3ffa2
chore(eks): update cdk8s integration docs to use cdk8s v2 (#20919)
iliapolo Jul 6, 2022
cc18b71
chore(sns): addSubscription does not return the subscription (#20819)
jonnekaunisto Jul 7, 2022
f9de2ce
chore: remove cfnspec patch for Cognito::UserPool.UsernameConfigurati…
madeline-k Jul 7, 2022
99d4d52
fix(triggers): permissions race condition (#19455)
tenjaa Jul 7, 2022
45313d3
doc(cli): point out `cdk watch` limitations (#21033)
rix0rrr Jul 7, 2022
f304781
feat(integ-tests): expose adding IAM policies to the assertion provid…
corymhall Jul 7, 2022
9f69d99
fix(cli): CLI errors when run as a non-existent user (#21018)
corymhall Jul 7, 2022
d915732
feat(batch): add launchTemplateId in LaunchTemplateSpecification (#20…
robertd Jul 7, 2022
62d80e7
chore: update F# template for new `addSubscription` signature (#21038)
rix0rrr Jul 7, 2022
d8bd45c
fix(logs): `ResourcePolicy` does not have a `defaultChild` (#21039)
rix0rrr Jul 7, 2022
c3b9091
fix(pipelines): cannot publish assets to more than 35 environments (#…
rix0rrr Jul 7, 2022
2e9551b
fix(aws-ec2): flow log destinationOptions requires all properties (#2…
corymhall Jul 7, 2022
cda6f10
chore: add manual dispatch option to issue reprioritization manager (…
kaizencc Jul 7, 2022
174b77b
fix: flowlog has no default child (#21045)
peterwoodworth Jul 7, 2022
2b4d28e
chore(init-templates): remove v1 init templates (#21019)
TheRealAmazonKendra Jul 8, 2022
e7f4602
feat(core): add a description parameter for the NestedStackProps (#20…
joe-king-sh Jul 8, 2022
46c05ae
docs(ecs-patterns): make property descriptions more clear (#19404)
mkrauklis Jul 8, 2022
01b5869
docs(ecs): add an example for AsgCapacityProvider with EC2 LaunchTemp…
kimisme9386 Jul 8, 2022
d804573
fix(route53): publichostedzone import returns IHostedZone instead of …
peterwoodworth Jul 8, 2022
5a74a84
fix(cli): format of tags in cdk.json is not validated (#21050)
SydneyUni-Jim Jul 8, 2022
7dab761
feat(cfnspec): cloudformation spec v79.0.0 (#21053)
aws-cdk-automation Jul 8, 2022
99b5bbb
fix(iam): `conditions` parameters accept array values (#21009)
rix0rrr Jul 8, 2022
f7f9ff2
fix(sns-subscriptions): restrict encryption of queue to only the resp…
daschaa Jul 8, 2022
e8a1011
:sparkles: Adds region to fromLookup and to fromVpcAttributes
daschaa Jul 9, 2022
fcc388d
Merge branch 'main' into hostedzone-vpc-region
daschaa Jul 9, 2022
66a3c4f
Merge branch 'main' into hostedzone-vpc-region
daschaa Jul 15, 2022
1a96ebc
Merge branch 'main' into hostedzone-vpc-region
mergify[bot] Jul 18, 2022
3630c38
Merge branch 'aws:main' into hostedzone-vpc-region
daschaa Aug 1, 2022
8dfd079
:recycle: Changes due to review
daschaa Aug 1, 2022
49b23d7
:white_check_mark: Adds integration tests for lookup
daschaa Aug 8, 2022
9e0c533
Merge branch 'main' into hostedzone-vpc-region
daschaa Aug 8, 2022
b515e6a
Merge branch 'main' into hostedzone-vpc-region
mergify[bot] Sep 7, 2022
9063de0
:recycle: Changes due to review
daschaa Sep 7, 2022
9d0ed5b
Merge branch 'main' into hostedzone-vpc-region
mergify[bot] Sep 7, 2022
84aca59
Merge branch 'main' into hostedzone-vpc-region
mergify[bot] Sep 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions packages/@aws-cdk/aws-ec2/lib/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,13 @@ export interface VpcAttributes {
* VPN gateway's identifier
*/
readonly vpnGatewayId?: string;

/**
* The region the VPC is in
*
* @default - The region of the stack where the VPC belongs to
*/
readonly region?: string;
}

export interface SubnetAttributes {
Expand Down Expand Up @@ -1203,7 +1210,12 @@ export class Vpc extends VpcBase {
dummyValue: undefined,
}).value;

return new LookedUpVpc(scope, id, attributes || DUMMY_VPC_PROPS, attributes === undefined);
const lookedUpVpcProps = {
...attributes,
region: options.region,
daschaa marked this conversation as resolved.
Show resolved Hide resolved
};

return new LookedUpVpc(scope, id, attributes ? lookedUpVpcProps : DUMMY_VPC_PROPS, attributes === undefined);

/**
* Prefixes all keys in the argument with `tag:`.`
Expand Down Expand Up @@ -2008,7 +2020,9 @@ class ImportedVpc extends VpcBase {
private readonly cidr?: string | undefined;

constructor(scope: Construct, id: string, props: VpcAttributes, isIncomplete: boolean) {
super(scope, id);
super(scope, id, {
region: props.region,
});

this.vpcId = props.vpcId;
this.vpcArn = Arn.format({
Expand Down Expand Up @@ -2058,7 +2072,9 @@ class LookedUpVpc extends VpcBase {
private readonly cidr?: string | undefined;

constructor(scope: Construct, id: string, props: cxapi.VpcContextResponse, isIncomplete: boolean) {
super(scope, id);
super(scope, id, {
region: props.region,
});

this.vpcId = props.vpcId;
this.vpcArn = Arn.format({
Expand Down
48 changes: 48 additions & 0 deletions packages/@aws-cdk/aws-ec2/test/integ.vpc-lookup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import * as cdk from '@aws-cdk/core';
import { IntegTest } from '@aws-cdk/integ-tests';
import * as ec2 from '../lib';

const appWithVpc = new cdk.App();
const stack = new cdk.Stack(appWithVpc, 'StackWithVpc', {
env: {
region: 'eu-west-1',
account: '123456',
},
});

const testVpc = new ec2.Vpc(stack, 'MyVpc', {
vpcName: 'my-vpc-name',
});

const appUnderTest = new cdk.App();
const stackLookup = new cdk.Stack(appUnderTest, 'StackUnderTest', {
env: {
region: 'us-east-2',
account: '123456',
},
});

const vpcFromVpcAttributes = ec2.Vpc.fromVpcAttributes(stackLookup, 'VpcFromVpcAttributes', {
region: 'eu-west-1',
availabilityZones: ['eu-west-1a'],
vpcId: testVpc.vpcId,
});

const vpcFromLookup = ec2.Vpc.fromLookup(stack, 'VpcFromLookup', {
region: 'eu-west-1',
vpcName: 'my-vpc-name',
});

new cdk.CfnOutput(stackLookup, 'OutputFromVpcAttributes', {
value: `Region fromVpcAttributes: ${vpcFromVpcAttributes.env.region}`,
});

new cdk.CfnOutput(stackLookup, 'OutputFromLookup', {
value: `Region fromLookup: ${vpcFromLookup.env.region}`,
});

new IntegTest(appUnderTest, 'ArchiveTest', {
testCases: [stackLookup],
});
appWithVpc.synth();
appUnderTest.synth();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Outputs": {
"OutputFromVpcAttributes": {
"Value": "Region fromVpcAttributes: eu-west-1"
},
"OutputFromLookup": {
"Value": "Region fromLookup: eu-west-1"
}
}
}
Loading