A couple of steps to set some base resources for the main domain.
- Add the
HostedZonefor the root domain:example.com - Create a
Certificatefor the domain and add its record toRoute53
(Note: prod is done manual to keep the NS records the same and to not accidentally delete prod DNS via code)
An initial infrastructure cdk deploy is required to get some global resources deployed.
cd infrastructure && npx cdk bootstrap
npm run cdk-init -w infrastructureThis will create the following resources:
| Resource | Value | Description |
|---|---|---|
| IAM Role | saas-github-oidc-provider-role |
Assumed by GitHub Actions |
| ECR image | <AWS_ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/saas-base:latest |
Contains CLI tools: node, aws-cli, git, jq |
ci.yml- runs code checks and deploys any CDK tool changes (deploy-cdk-tools.yml)deploy-cdk-env.yml- once CI is complete and merged in, deploys anydevCDK infrastrucutre changes
Repository variables
- BASE_IMAGE_NAME -
saas-base - AWS_ACCOUNT_ID
- AWS_REGION
Repository secrets
- SONAR_TOKEN
Environments
dev- NODE_ENV -
dev
- NODE_ENV -
To keep consistent with environment resource names and prefixes, use the following conventions:
- Parameter Store prefix -
/saas/dev/* - AWS resource names prefix -
saas-dev-*