jetbridge / cdk-nextjs

Deploy a NextJS application using AWS CDK
https://constructs.dev/packages/cdk-nextjs-standalone
Apache License 2.0
260 stars 43 forks source link

NextjsDomain overrides are not being passed #207

Closed patrickufer closed 4 months ago

patrickufer commented 4 months ago

Overrides should be passed through the same for NextjsDomain as they are for the other constructs.

Currently this doesn't work:

new Nextjs(this, 'Nextjs', {
  nextjsPath: props.sourcePath,
  domainProps: {
    hostedZone,
    domainName,
    certificate
  },
  overrides: {
    nextjsDomain: {
      aRecordProps: {
        deleteExisting: true
      },
      aaaaRecordProps: {
        deleteExisting: true
      }
    }
  }
})

But this does

new Nextjs(this, 'Nextjs', {
  nextjsPath: props.sourcePath,
  domainProps: {
    hostedZone,
    domainName,
    certificate
  },
  overrides: {
    nextjs: {
      nextjsDomainProps: {
        overrides: {
          aRecordProps: {
            deleteExisting: true
          },
          aaaaRecordProps: {
            deleteExisting: true
          }
        }
      }
    }
  }
})