Skip to content

Commit 6d0cdc7

Browse files
authored
chore: Update READMEs to reflect new cross-stack sharing mechanism (#1556)
1 parent 882b8ff commit 6d0cdc7

File tree

12 files changed

+794
-102
lines changed

12 files changed

+794
-102
lines changed

packages/@aws-cdk/aws-certificatemanager/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ const certificate = new Certificate(this, 'Certificate', {
3737

3838
### Importing
3939

40-
Import a certificate either manually, if you know the ARN:
40+
Import a certificate manually, if you know the ARN:
4141

4242
```ts
4343
const certificate = Certificate.import(this, 'Certificate', {
4444
certificteArn: "arn:aws:..."
4545
});
4646
```
4747

48-
Or use exporting and importing mechanisms between stacks:
48+
### Sharing between Stacks
4949

50-
```ts
51-
const certRef = certStack.certificate.export();
50+
To share the certificate between stacks in the same CDK application, simply
51+
pass the `Certificate` object between the stacks.
5252

53-
const certificate = Certificate.import(this, 'Certificate', certRef);
54-
```
5553

56-
> We should probably also make a Custom Resource that can looks up the certificate ARN
57-
> by domain name by querying ACM.
54+
## TODO
55+
56+
- [ ] Custom Resource that can looks up the certificate ARN by domain name by querying ACM.
57+
- [ ] Custom Resource to automate certificate validation through Route53.

packages/@aws-cdk/aws-ec2/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,15 @@ The `VpcNetwork` above will have the exact same subnet definitions as listed
172172
above. However, this time the VPC will have only 1 NAT Gateway and all
173173
Application subnets will route to the NAT Gateway.
174174

175-
#### Sharing VPCs across stacks
175+
#### Sharing VPCs between stacks
176176

177177
If you are creating multiple `Stack`s inside the same CDK application, you
178178
can reuse a VPC defined in one Stack in another by using `export()` and
179179
`import()`:
180180

181-
[sharing VPCs between stacks](test/example.share-vpcs.lit.ts)
181+
[sharing VPCs between stacks](test/integ.share-vpcs.lit.ts)
182+
183+
#### Importing an existing VPC
182184

183185
If your VPC is created outside your CDK app, you can use `importFromContext()`:
184186

0 commit comments

Comments
 (0)