[WIP] - Terraform Infrastructure as Code Collector for Hygieia
JavaApache-2.0
Due to lack of activity, this repo is currently not being supported and is archived as of 07/12/22. Please note since archival, the project is not maintained and will be available in a read-only state. Please reach out to hygieia2@capitalone.com should you have any questions.
A collector to showcase the Terraform Cloud App details
Each Terraform app has Organization > Workspace > run jobs
* Organization : Model to store the Organization details from Terraform Cloud App
* Workspace : Model to Store Workpsace belonging to an Organizatiion from Terrafrom Cloud App
* Run : Model to Store Runs belonging to an Workpsace from Terrafrom Cloud App
* TerraformCollectorItem: The class extending the CollectorItem storing only the apiToken, which is enough to call the Terraform Cloud Apis
Which API this collector calls?
The Workspace Cloud App by Terraform provide REST api to call and share details about Organizatiion, Workspace & Run Jobs
The Classes and the description
Terraform Controller: To expose the api calls made from UI to get the Component Data
TerraformCollectorTask : As with the framework , implemeting Collector Task to regulary collect the details from Terraform Cloud App and feed into the MongoDb
TeraafromServiceImpl: To populate the componentData mdel and send back to UI
TerraformCustomRepository: A MongoTemplate based repository, to do some aggrrgate group by queries against mondo db
To build docker & mounting the application.properties while docker build
docker run -t -i -p port-internal:port-external -v properties_location://hygieia/config image_name