1.153.1 • Published 2 years ago

@makemydeal/cdk-network-stack v1.153.1

Weekly downloads
254
License
ISC
Repository
-
Last release
2 years ago

cdk-network-stack

This stack will allow you to create a HostedZone and Certificate so you can have a custom domain name for use in API Gateway, CloudFront or anywhere else.

Stacks

StackDescription
NetworkStackAllow for creation of a HostedZone and Certificate for a custom domain name.

NetworkStack Properties

PropertyRequiredTypeDescription
applicationNameYesstringName of the application and used as a prefix for all lambda names
environmentNameYesstringThe logical environment (dev, qa, etc)
domainNameYesstringThe full domain name (test-dev.accelerate.dealer.com for example)
envNocdk.EnvironmentThe environment needed for this work. This is important to set the same as other stacks so you can use the public properties of the stack

Public "Output" Properties

PropertyTypeDescription
certificateICertificateReference to the created Certificate
hostedZoneIHostedZoneReference to the created Hosted Zone
domainNamestringThe full domain name (test-dev.accelerate.dealer.com for example)

Managers

Managers are used to have a consolidated object that will control the CICD and Build process. This allows the same object to be passed to the CICD and APP setups. They allow for custom actions to be run during the IAC Setup, the Environment Setup, and when creating the stack. These managers will be passed to the CICD process.

Each stack above has a corresponding manager:

  • NetworkStackManager

Creating HostedZones and Certificates

There are a couple manual steps to do when creating a HostedZone and Certificate. These have to happen the first time as you run the pipeline, but won't have to happen again.

DNS Validation of Certificate

AWS Certificate Manager uses DNS Validation of the certificate. Here are instructions on how to do that: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html

HostedZone NS records

Depending on the domain you select, you may need to go to the HostedZone in the account that is managing the nameserver and add NS records there. For instance, accelerate.dealer.com is in awsmmd account. Follow these steps:

  • After the HostedZone is created in the account (while the pipeline is still running if possible), you can go to the NS record and copy the value. It should be 4 nameservers.
  • Go to the account that owns the hosted zone
  • Open the hosted zone, and add a new record
  • Add a NS record with the record name being your domain test.accelerate.dealer.com for instance, and for the value, take the NS values you copied in step 1.

Usage

import { NetworkStack } from '@makemydeal/cdk-network-stack';

const networkStack = networkManager.CreateStack(app, {
    domainName, // the full domain you wish to create
    environmentName, // environment name like dev, qa, etc
    env // AWS account/region
});
1.153.1

2 years ago

1.153.2-alpha.0

2 years ago

1.143.42

2 years ago

1.143.41

2 years ago

1.143.44

2 years ago

1.143.43

2 years ago

1.143.35

2 years ago

1.143.37

2 years ago

1.143.36

2 years ago

1.143.40

2 years ago

1.143.39

2 years ago

1.143.38

2 years ago

1.143.31

2 years ago

1.143.30

2 years ago

1.143.32

2 years ago

1.143.28

2 years ago

1.143.27

2 years ago

1.143.29

2 years ago

1.143.24

2 years ago

1.143.23

2 years ago

1.143.26

2 years ago

1.143.25

2 years ago

1.143.22

2 years ago

1.143.21

2 years ago

1.143.31-alpha.4

2 years ago

1.143.12-alpha.0

2 years ago

1.143.14-alpha.0

2 years ago

1.143.14

2 years ago

1.143.8-alpha.0

2 years ago

1.143.13-alpha.0

2 years ago

1.143.26-alpha.0

2 years ago

1.143.32-alpha.2

2 years ago

1.143.32-alpha.1

2 years ago

1.143.32-alpha.0

2 years ago

1.143.32-alpha.4

2 years ago

1.143.32-alpha.3

2 years ago

1.143.11-alpha.0

2 years ago

1.143.5

2 years ago

1.143.1

2 years ago

1.143.2

2 years ago

1.143.3

2 years ago

1.111.0

2 years ago

1.113.0

2 years ago

1.114.0

2 years ago

1.105.0

3 years ago

1.106.0

2 years ago

1.100.1-alpha.0

3 years ago

1.95.0

3 years ago

1.89.0

3 years ago

1.83.0

3 years ago

1.82.1-alpha.0

3 years ago

1.79.0

3 years ago

1.82.0

3 years ago

1.78.0

3 years ago

1.76.1-alpha.0

3 years ago

1.77.0

3 years ago

1.75.1-alpha.0

3 years ago

1.76.0

3 years ago

1.69.0

3 years ago

1.68.18-alpha.0

3 years ago

1.68.14-alpha.0

3 years ago

1.68.12-alpha.0

3 years ago

1.68.7-alpha.0

3 years ago

1.68.9-alpha.0

3 years ago

1.68.3-alpha.0

3 years ago

1.68.1-alpha.0

3 years ago

1.67.0

3 years ago

1.64.6-alpha.0

3 years ago

1.65.0

3 years ago

1.60.0

3 years ago

1.59.0

3 years ago

1.58.9-alpha.0

3 years ago

1.58.8-alpha.0

3 years ago

1.58.7-alpha.0

3 years ago

1.58.5-alpha.0

3 years ago

1.58.4-alpha.0

3 years ago

1.58.2-alpha.0

3 years ago

1.58.1-alpha.0

3 years ago

1.58.0

3 years ago

1.56.0

3 years ago

1.55.0

3 years ago

1.51.0

3 years ago

1.50.0

3 years ago

1.49.0-alpha.0

3 years ago

1.47.0

3 years ago

1.45.0

3 years ago

1.44.1-alpha.0

3 years ago

1.44.0

3 years ago

1.43.1-alpha.0

3 years ago

1.43.3-alpha.0

3 years ago

1.42.0

3 years ago

1.43.0

3 years ago

1.41.1-alpha.0

3 years ago

1.40.1-alpha.0

3 years ago

1.41.0

3 years ago

1.37.0

3 years ago

1.39.0

3 years ago

1.31.0

3 years ago

1.30.0

3 years ago