Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[USEFUL] Enable creation of terraform files from CPLN YAML files for new app #173

Open
justin808 opened this issue May 14, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@justin808
Copy link
Member

justin808 commented May 14, 2024

  1. In addition to .controlplane/templates dir, support a .controlplane/terraform dir and enable commands to use those.
@justin808 justin808 changed the title Enable creation of terraform files from CPLN YAML files for new app [USEFUL] Enable creation of terraform files from CPLN YAML files for new app May 14, 2024
@justin808 justin808 added the enhancement New feature or request label May 14, 2024
@zzaakiirr
Copy link
Contributor

After discussion with @borela we came up this first task that we can work on:

Why?
User wants to use terraform to deploy application using CPLN as a provider

Goal
Create Terraform config files from existing YAML configuration files in .controlplane folder

Before

controlplane/
├─ templates/
│  ├─ app.yml -- GVC config
│  ├─ postgres.yml -- workload config
│  ├─ rails.yml -- worload config
├─ controlplane.yml -- configs for overall application
├─ Dockerfile
├─ entrypoint.sh

After (generated files may change)

.controlplane/
├─ templates/
│  ├─ app.yml -- GVC config
│  ├─ postgres.yml -- workload config
│  ├─ rails.yml -- worload config
├─ terraform/
│  ├─ app.tf -- GVC config in HCL
│  ├─ postgres.tf -- Postgres workload config in HCL
│  ├─ rails.tf -- Rails worload config in HCL
│  ├─ providers.tf -- CPLN provider config in HCL
│  ├─ variables.tf -- Variables config in HCL
│  ├─ loacals.tf   -- Local variables config in HCL
├─ controlplane.yml -- configs for overall application
├─ Dockerfile
├─ entrypoint.sh

Task
Add cpflow terraform generate command which transforms existing controlplane configs in YAML format to Terraform configs in HCL format and saves them in .controlplane/terraform folder

@zzaakiirr zzaakiirr self-assigned this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants