-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Sebastian Rodriguez edited this page Sep 17, 2022
·
2 revisions
Any and all contributions to awslimitchecker are welcome.
Please raise all pull requests against the main
branch. This is still a personal project, so I cannot guarantee any timelines by which I will be able to review and merge the PR.
Passing all tests and adding necessary code coverage will definitely help speed up the time to review your pull request.
- Fork the awslimitchecker repo
- Check out a new git branch. If you’re working on a GitHub issue you opened, your branch should be called
issues/N
where N is the issue number. - Make the required changes. Make sure the code compiles
go build ./... && go install ./...
- Add the required unit tests and check that everything passes
go test -v ./...
- Run vet and linter to make sure the changes will pass the github actions
- Submit the pull request!
Adding a new service should be relatively easy! (see example of initial commit for adding support for elasticache
- The new service should be in camelCase (preferrably following the aws service code) and located in
internal/services
(for eginternal/services/elasticache.go
) - Create a new interface that contains all function definitions you will use in the service's aws go sdk
- Initialize the client in
internal/services/awsHelper.go
- Create the service checker!
- Create a function that returns a SvcQuota (naming convention: NewChecker). You will need to specify the service code, the map of quota to function to check usage and the iam services required
- Implement the function above
- Create the respective tests in
internal/services
with the same name as the implemention, and_test
appended at the eng (for eginternal/services/elasticache_test.go
)
Adding a new quota is even simpler than adding a new service (see example commit
- Go to the service you want to improve
- Add an entry in the map
supportedQuotas
within the checker initialization func (NewChecker) - Implement the function specified above to measure usage
- Add the relevant unit tests testing that usage function!