dwmkerr / terraform-aws-openshift

Create infrastructure with Terraform and AWS, install OpenShift. Party!
http://www.dwmkerr.com/get-up-and-running-with-openshift-on-aws
MIT License
170 stars 173 forks source link

Support usage as a Terraform Module #58

Open bkconrad opened 6 years ago

bkconrad commented 6 years ago

Basically I'd like to use this as part of the infrastructure I manage with Terraform. The idiomatic way of doing this is to use it as a module e.g.

module "openshift" {
  source = "github.com/dwmkerr/terraform-aws-openshift//modules/openshift"
}

However there are a few problems with this currently:

  1. The ansible provisioning stuff is run through a Makefile, not immediately usable when this repo is used as a module. Ideally for use as a terraform module it would be managed via Terraform either by userdata bootstrapping or local execution through a TF provision block.

  2. Admin creds, cluster size, node tags, and many other aspects are hard coded and not configurable without editing the TF code or ansible config file directly. This necessitates maintaining a separate fork for each environment I want to use this TF setup for.

I'm interested in doing some work to support usage of this repository as a module but would like to know if this is worthwhile in the maintainer's view and start a general discussion. The necessary changes would be fairly large and change a lot of the fundamentals of how this setup is implemented.

dwmkerr commented 6 years ago

Hi @bkconrad,

Apologies for the late reply. Let me know how you'd like to approach this. I have no problem with the general goals. I anticipate that there may be some challenges, the reason the terrafom setup and openshift setup are separate at the moment is that the setup of the infra is generally seamless, but the setup of the software can be challenging. Being able to run the setup repeatedly while troubleshooting can be helpful. But I'd love to hear your proposed solution!