The following components use this resource and are potentially impacted by any changes. They should also be validated to ensure the changes do not cause a regression.
- Project L1 CDK constructor
- Atlas basis L3 CDK constructor
- Encryption at rest L3 CDK constructor
- Atlas Quickstart
- Atlas Quickstart Fargate
- Atlas organization
- Atlas Team
- Atlas user
All resources are created as part of cfn-testing-helper.sh
Please, follows the steps in TESTING.md.
- The project should be visible in the project list page:
- The api keys should be visible in the project API Keys page:
- The team should be visible in the project Team page:
- E2E tests are located under
cfn-resources/test/e2e/project
. Please ensure to run/update those accordingly.
To run the automated E2E tests use following commands:
cd cfn-resources/test/e2e/project
go test -v project_test.go
The local tests are integrated with the AWS sam local
and cfn invoke
tooling features:
make build
# Required the docker daemon running
sam local start-lambda --skip-pull-image
Update the template file in test/templates/sam/project.sample-cfn-request.json
and add the Name
(project name), OrgId
and ApiKeys
.
Example:
"desiredResourceState":{
"Name": "YourProjectName",
"OrgId": "60ddf55c27a5a20955a707d7",
"ApiKeys": {
"PublicKey": "wwdsirvb",
"PrivateKey": "privateKey"
},
cfn invoke --function-name TestEntrypoint resource CREATE test/templates/project.sample-cfn-request.json
cfn invoke --function-name TestEntrypoint resource READ test/templates/project.sample-cfn-request.json
In order to test DELETE, you need to add the property Id
(projectId) in test/templates/sam/project.sample-cfn-request.json
.
Example:
"desiredResourceState":{
"Name": "YourProjectName",
"OrgId": "60ddf55c27a5a20955a707d7",
"Id": "63dcc31db5a65b3c3500bc62",
"ApiKeys": {
"PublicKey": "wwdsirvb",
"PrivateKey": "privateKey"
},
You can retrieve the projectId to add to the sam template by running:
cfn invoke --function-name TestEntrypoint resource READ test/templates/project.sample-cfn-request.json
cfn invoke --function-name TestEntrypoint resource DELETE test/templates/project.sample-cfn-request.json
In order to test UPDATE, you need to add the property Id
(projectId) and ProjectTeams
in test/templates/sam/project.sample-cfn-request.json
.
Example:
"desiredResourceState":{
"Name": "YourProjectName",
"OrgId": "60ddf55c27a5a20955a707d7",
"Id": "63dcc31db5a65b3c3500bc62",
"ApiKeys": {
"PublicKey": "wwdsirvb",
"PrivateKey": "privateKey"
},
"ProjectTeams": [
{
"TeamId": "63dccf0bb5a65b3c3500d5d7",
"RoleNames": ["GROUP_OWNER"]
}
]
You can retrieve the teams available in your organization with AtlasCLI:
atlas teams list
ID NAME
63dccf0bb5a65b3c3500d5d7 Test
cfn invoke --function-name TestEntrypoint resource UPDATE test/templates/project.sample-cfn-request.json