Skip to main content

This construct returns a wildcard certificate valid for subdomains of the given domain names, creating and validating on if it doesn't exist. It supports cross-account DNS validation, you can pass in arns of roles from other accounts and it'll assume them whilst doing the Route53 updates.

Project description

@reapit-cdk/wildcard-certificate

npm version npm downloads coverage: 96.75%25 Integ Tests: ✔

This construct returns a wildcard certificate valid for subdomains of the given domain names, creating and validating on if it doesn't exist. It supports cross-account DNS validation, you can pass in arns of roles from other accounts and it'll assume them whilst doing the Route53 updates.

Package Installation:

yarn add --dev @reapit-cdk/wildcard-certificate
# or
npm install @reapit-cdk/wildcard-certificate --save-dev

Usage

import { CfnOutput, Stack, App } from 'aws-cdk-lib'
import { WildcardCertificate } from '@reapit-cdk/wildcard-certificate'

const app = new App()
const stack = new Stack(app, 'stack-name', {
  // stack env is required if hostedZoneArn isn't specified
  env: {
    region: 'us-east-1',
    account: '000000',
  },
})

// simple example
const wildcardCertificate = new WildcardCertificate(stack, 'cert', {
  domains: [
    {
      domainName: 'example.org',
    },
    {
      domainName: 'example.com',
    },
  ],
})
new CfnOutput(stack, 'wildcardCertificateArn', {
  value: wildcardCertificate.certificate.certificateArn,
})

// cross-account example
const xAccountWildcardCertificate = new WildcardCertificate(stack, 'x-account-cert', {
  domains: [
    {
      domainName: 'example.org',
    },
    {
      domainName: 'example.com',
      hostedZoneArn: 'arn:partition:route53::account:hostedzone/Id',
      roleArn: 'arn:aws:iam::account:role/role-name-with-path',
    },
  ],
})
new CfnOutput(stack, 'xAccountWildcardCertificateArn', {
  value: xAccountWildcardCertificate.certificate.certificateArn,
})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapit-cdk.wildcard-certificate-0.1.0.tar.gz (124.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reapit_cdk.wildcard_certificate-0.1.0-py3-none-any.whl (122.9 kB view details)

Uploaded Python 3

File details

Details for the file reapit-cdk.wildcard-certificate-0.1.0.tar.gz.

File metadata

File hashes

Hashes for reapit-cdk.wildcard-certificate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab31979ddee2f4c3d0dc00d5597c691f9739fff0d9712b63859ce564da02a068
MD5 8347bab86ca680f952121f3b4e6fd206
BLAKE2b-256 91c48c3996e660ba0cf48b57c1bcb4ec20228a5ecb51d7a1bcca5012bfec9b67

See more details on using hashes here.

File details

Details for the file reapit_cdk.wildcard_certificate-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reapit_cdk.wildcard_certificate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dfb8a5c5a31f07f58ef635920122729d3c04770f85e4edabff8fbc53f3aadce
MD5 b3d8e9b201ac26b0205df3e5e61c8f8d
BLAKE2b-256 3af3131dff0c92af2b78b3cfa898219816db94200e0e57fda8666f820cf3d132

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page