AWS CDK utilities for Jaypie
@jaypie/cdk
is a CommonJS package that is compatible with the AWS CDK libraries. Unlike other Jaypie packages, @jaypie/cdk
should not be installed alongside jaypie
.
npm install @jaypie/cdk
TODO: Example should include one trivial and possibly one thorough example of using the library
import {
cfnOutput,
isValidHostname,
isValidSubdomain,
mergeDomain,
projectTagger,
} from "jaypie";
Creates a CloudFormation output for each key in the output object.
import { CfnOutput } from "aws-cdk-lib";
import { cfnOutput } from "jaypie";
const output = {};
output["key"] = "value";
// ...
cfnOutput({ CfnOutput, output, stack: this });
What it says on the tin. Returns boolean
import { isValidHostname } from "jaypie";
const hostname = "example.com";
const isValid = isValidHostname(hostname);
What it says on the tin. Returns boolean
import { isValidSubdomain } from "jaypie";
const subdomain = "sub.example.com";
const isValid = isValidSubdomain(subdomain);
Merges a subdomain with a domain
import { mergeDomain } from "jaypie";
const domain = "example.com";
const subdomain = "sub";
const merged = mergeDomain(subdomain, domain); // "sub.example.com"
Tags the stack with stack name and project conventions.
import cdk from "aws-cdk-lib";
import { projectTagger } from "jaypie";
// ...
projectTagger({
cdk,
stack,
stackName,
});
Tags:
- buildDate
- buildTime
- commit
- creation
- env
- nonce
- project
- service
- sponsor
- stack
- version
Date | Version | Summary |
---|---|---|
3/30/2024 | 1.0.0 | First complete version |
3/30/2024 | 0.0.1 | Initial commit |
Published by Finlayson Studio. All rights reserved