Skip to content

Commit

Permalink
Update README to use the Zone type directly
Browse files Browse the repository at this point in the history
  • Loading branch information
toddhainsworth committed Jan 11, 2023
1 parent 27b169d commit 09491ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/shared-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ The following can be used to provision a shared VPC.
import 'source-map-support/register';
import * as cdk from '@aws-cdk/core';
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { SharedVpc, SharedVpcProps } from '@aligent/cdk-shared-vpc';
import { SharedVpc, SharedVpcProps, Zone } from '@aligent/cdk-shared-vpc';
const hostedZones: Zone[] = [
{ type: "A", target: "10.6.0.12", record: "subdomain" }
]
const sharedVpcProps : SharedVpcProps = {
vpcName: 'my-vpc-name',
cidr: '10.0.0.0/16',
hostedZoneDomain: 'example.com',
hostedZoneRecords: "[{ "type": "A", "target": "10.6.0.12", "record": "subdomain" }]"
hostedZoneRecords: hostedZones
};
class MyStack extends Stack {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-vpc/lib/shared-vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ARecord, CnameRecord, PrivateHostedZone, RecordTarget } from '@aws-cdk/

const DEFAULT_ZONE_RECORD_SUFFIX = 'root';

type Zone = {
export type Zone = {
type: string,
target: string,
record?: string
Expand Down

0 comments on commit 09491ae

Please sign in to comment.