Skip to content

Development

Sebastian Rodriguez edited this page Sep 17, 2022 · 2 revisions

Any and all contributions to awslimitchecker are welcome.

Pull requests

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.

Installing for development

  1. Fork the awslimitchecker repo
  2. 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.
  3. Make the required changes. Make sure the code compiles go build ./... && go install ./...
  4. Add the required unit tests and check that everything passes go test -v ./...
  5. Run vet and linter to make sure the changes will pass the github actions
  6. Submit the pull request!

Adding New Services

Adding a new service should be relatively easy! (see example of initial commit for adding support for elasticache

  1. The new service should be in camelCase (preferrably following the aws service code) and located in internal/services (for eg internal/services/elasticache.go)
  2. Create a new interface that contains all function definitions you will use in the service's aws go sdk
  3. Initialize the client in internal/services/awsHelper.go
  4. 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
  5. Create the respective tests in internal/services with the same name as the implemention, and _test appended at the eng (for eg internal/services/elasticache_test.go)

Adding a new quota

Adding a new quota is even simpler than adding a new service (see example commit

  1. Go to the service you want to improve
  2. Add an entry in the map supportedQuotas within the checker initialization func (NewChecker)
  3. Implement the function specified above to measure usage
  4. Add the relevant unit tests testing that usage function!
Clone this wiki locally