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 174 forks source link

Install to an existing VPC #74

Open mathus13 opened 5 years ago

mathus13 commented 5 years ago

Thank you for this. I am new to openshift/k8, and still pretty new to AWS. Using terraform to bootstrap this is so helpful.

I have a need to create the openshift cluster in a pre-existing vpc and subnet. I am wondering what the best method is to bypass the vpc creation and pass the vpc and subnet ids as a variable

dwmkerr commented 5 years ago

Hi @mathus13 it will not be possible to add to an existing VPC without some modification to the Terraform code I'm afraid! If you are struggling to do it let me know and I will try to find some time to help.

mathus13 commented 5 years ago

Thank you. I figured out how to do what I needed. Do you think it would be helpful to implement a VPC and/or Subnet variable using if statements? If so, I would be happy to submit a PR

dwmkerr commented 5 years ago

Yes that would be awesome!

On Mon, 14 Jan 2019 at 3:21 PM, Shawn Barratt notifications@github.com wrote:

Thank you. I figured out how to do what I needed. Do you think it would be helpful to implement a VPC and/or Subnet variable using if statements? If so, I would be happy to submit a PR

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dwmkerr/terraform-aws-openshift/issues/74#issuecomment-454042157, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1nSFZjGfQBQbh41SUvLXD8g4aXL9Ehks5vDKCIgaJpZM4Z75R7 .

arashkaffamanesh commented 5 years ago

@mathus13 any news about this issue?

mathus13 commented 5 years ago

@arashkaffamanesh Time has been tight to write any kind of conditional, but I was able to make it work by emptying step 7 and replacing references to the created VPC and Subnet ids with passed variables.

I would consider this a closed issue, and if I can find time to write functionality for this I will post a PR.