I intend to clean up the code more as I start writing tests. We've gone back and forth a bit on CLI requirements recently, and there was a lot of discovery work involved in this. Therefore I neglected proper error handling, logging, and testing in favor of putting more functionality into the POC so as to drive alignment.
The markdown files are autogenerated. I suggest using the file filter to filter them out.
I'm continuing to look into patterns for inversion of control and dependency injection in go. The current solution was a bit rushed. Suggestions are welcome.
Current Functionality:
dce init uses an interactive prompt to generate a config file
dce deploy deploys dce to a new master account based on credentials in the config file. Terraform and code artifacts are downloaded from the latest github release.
dce auth opens a web browser to the authentication (SSO) url provided in the config file. User is instructed to login and then copy/paste their API credentials into the terminal. This is not yet integrated with the backend auth solution.
dce accounts add --account-id <string> --admin-role-arn <string> adds an existing account to the accounts pool Bug: The codebuild reset is currently failing to trigger on master accounts deployed by the cli.
dce leases login [--account-id <string> | --lease-id <string>] --open-browser returns temporary credentials for a leased account. Opens a browser to the console if the --open-browser flag is present. This is not yet integrated with the backend auth solution.
dce leases end --account-id <string> --principle-id <string> ends a lease
dce accounts remove --account-id <string>
Next Steps:
Fix codebuild reset bug
Integrate auth & lease login
Write tests and create CI/CD for this repo
Implement remaining functionality. I would like to explore autogenerating dce deploy flags/interactive prompt from variables.tf and API client code/commands from swagger.
Goal
POC the core functionality of the CLI.
Important Notes
Current Functionality:
dce init
uses an interactive prompt to generate a config filedce deploy
deploys dce to a new master account based on credentials in the config file. Terraform and code artifacts are downloaded from the latest github release.dce auth
opens a web browser to the authentication (SSO) url provided in the config file. User is instructed to login and then copy/paste their API credentials into the terminal. This is not yet integrated with the backend auth solution.dce accounts add --account-id <string> --admin-role-arn <string>
adds an existing account to the accounts pool Bug: The codebuild reset is currently failing to trigger on master accounts deployed by the cli.dce leases create --budget-amount <float> --budget-currency <string> --email <stringArray> --principle-id <string>
creates a leasedce leases login [--account-id <string> | --lease-id <string>] --open-browser
returns temporary credentials for a leased account. Opens a browser to the console if the --open-browser flag is present. This is not yet integrated with the backend auth solution.dce leases end --account-id <string> --principle-id <string>
ends a leasedce accounts remove --account-id <string>
Next Steps:
dce deploy
flags/interactive prompt from variables.tf and API client code/commands from swagger.