compliant-financial-infrastructure icon indicating copy to clipboard operation
compliant-financial-infrastructure copied to clipboard

Split down Terraform monorepo

Open ml4 opened this issue 2 years ago • 6 comments

Feature Request

Description of Problem:

When versioning Terraform child module code in GH, use of a monorepo prevents the ability for the community to version each module separately. It is also against vendor best practice, and won't work with members who use the enterprise product.

Potential Solutions:

Split the Terraform code from this repo into separate Terraform repos. I will add a nomenclature to this issue when I have confirmed one. References:

  • https://www.terraform.io/cloud-docs/registry/publish-modules#preparing-a-module-repository
  • https://learn.hashicorp.com/tutorials/terraform/pattern-module-creation?in=terraform/modules

Terraform Module Repos Created

  • https://github.com/finos/cfi-terraform-template-child-module
  • https://github.com/finos/cfi-terraform-gcp-ocp
  • https://github.com/finos/terraform-aws-eks

Required Repos

  • Add here

ml4 avatar Jul 15 '22 15:07 ml4

Hey @ml4 👋🏻

Can you join #256 this week to discuss how this issue can be taken forward?

Cheers and speak soon,

James.

mcleo-d avatar Aug 25 '22 11:08 mcleo-d

Yes.

On 25 Aug 2022, at 12:44, James McLeod @.***> wrote:

 Hey @ml4 👋🏻

Can you join #256 this week to discuss how this issue can be taken forward?

Cheers and speak soon,

James.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

ml4 avatar Aug 25 '22 13:08 ml4

Related to work being done here ... https://github.com/finos/cfi-terraform-template-child-module

mcleo-d avatar Sep 09 '22 14:09 mcleo-d

  • [x] Create repos for child modules as needed, using template repo as base
  • [x] Next module to work is here: https://github.com/finos/compliant-financial-infrastructure/tree/dev/accelerators/kubernetes/eks/tf_cdmc_aws_eks

eddie-knight avatar Sep 09 '22 14:09 eddie-knight

Hey @eddie-knight, @ml4 and @devops-adeel,

There's been some awesome work on this epic that needs to be celebrated. We should let the group know about the new repos and invite contribution and help.

  • https://github.com/finos/cfi-terraform-template-child-module
  • https://github.com/finos/cfi-terraform-gcp-ocp
  • https://github.com/finos/terraform-aws-eks

James.

mcleo-d avatar Oct 06 '22 14:10 mcleo-d

The following repos have been linked to the CFI kanban ...

Screenshot 2022-10-06 at 15 04 37

mcleo-d avatar Oct 06 '22 14:10 mcleo-d

Allocate issue to @thinkl33t and the reproducible builds working group to move forward with new CFI services.

Moving to To Do.

mcleo-d avatar Nov 04 '22 14:11 mcleo-d

Need to tackle Postgres as well for this

eddie-knight avatar Nov 04 '22 14:11 eddie-knight

OK I will take a punt to:

  • Create the child module repo for postgres on azure
  • Migrate the code out of CFI
  • Rearrange the code to form standard hashicorp advice
  • Test

ml4 avatar Nov 04 '22 14:11 ml4

Contrary to the OP, the Terraform Module Repos Created were:

  • terraform-aws-cfi-dynamodb
  • terraform-aws-cfi-lambda
  • terraform-aws-cfi-redshift
  • terraform-aws-cfi-sqs
  • terraform-azurerm-cfi-aks
  • terraform-azurerm-cfi-postgresql
  • terraform-google-cfi-gke These have now been populated from the requisite CFI repo subdirectories. A PR to update the latter will be in today.

I propose that, as such, we can discuss this issue regarding its closure at the next WG meeting.

ml4 avatar Feb 01 '23 13:02 ml4

https://github.com/finos/compliant-financial-infrastructure/pull/322 removes the last bits of IaC from cfi's monorepo

thinkl33t avatar Feb 22 '23 15:02 thinkl33t

All changes made and merged.

AdrianHammond avatar Feb 22 '23 15:02 AdrianHammond