alt-dima / tofugu

Infrastructure layers configuration orchestrator for OpenTofu or Terraform
Apache License 2.0
3 stars 0 forks source link

Send basic tofi history to Toaster-ToasterDB #17

Open alt-dima opened 4 months ago

alt-dima commented 4 months ago

Implemented basic history POST request to Toaster Info stored in ToasterDB like

{
  "_id": { "$oid": "66367db93509ca433fdcfb06" },
  "orgname": "demo-org",
  "workspace": "master",
  "tofiname": "vpc",
  "cmdtoexec": "tofu",
  "cmdargs": [
    "-backend-config=bucket=default-tfstates",
    "-backend-config=key=org_demo-org/account_test-account/datacenter_staging1/vpc.tfstate",
    "-backend-config=region=us-east-2"
  ],
  "cmdmainarg": "init",
  "exitcode": { "$numberInt": "1" },
  "dimensions": {
    "account": "test-account",
    "datacenter": "staging1"
  },
  "accountid": "662cab7c5e226819838b01fa",
  "datecreated": {
    "$date": { "$numberLong": "1714846798515" }
  }
}