A couple of steps to set some base resources for the main domain.
- Add the
HostedZone
for the root domain:example.com
- Create a
Certificate
for 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 infrastructure
This 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 anydev
CDK 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-*