secdevops-cuse / CyberRange

The Open-Source AWS Cyber Range
https://medium.com/aws-cyber-range
459 stars 89 forks source link

Terraform Dependency Issue causing Failing Builds. #81

Closed cappetta closed 3 years ago

cappetta commented 4 years ago

CircleCI was not kicking off for some reason and I only get failure emails. I started the build manually and realized it wasn't triggered recently. Upon investigation I realized there was a gap in builds CICD builds - there are changes which have not been sanity checked by the build process & in addition there are some upstream terraform updates that need to be tested.

Todo:

See Upstream Terraform issue currently causing the main cicd failure: https://github.com/hashicorp/terraform/issues/23333

cappetta commented 4 years ago

Reverting to terraform 0.11.14 to work around the issue. The changes in the manifests between v0.11.14 & v0.12.xx required an update to the variables which I believe needs to be reverted.

 The Terraform configuration must be valid before initialization so that
 Terraform can determine which modules and providers need to be installed.

Error: Error parsing /root/CyberRange/terraform/environments/*********/main.tf: At 2:29: Unknown token: 2:29 IDENT var.region
cappetta commented 4 years ago

I've been able to update back to v0.12.13; CICD pipeline is green on 2 of 3 phases. Working through the issue on the final phase. I've added make & terraform checks. adding a note to add some vagrant sanity checks in the near future.

First I need to build a docker container and push an image to dockerhub. The CommandCenter image was established, now I need to build / push / test it.

https://hub.docker.com/r/awscyberrange/commandcenter

cappetta commented 4 years ago

Also need to add Slack-bot reporting of the build in the channel.

cappetta commented 3 years ago

Slackbot is reporting. this issue is resolved. cicd pipeline is functional terraform is updated to the latest