-
Notifications
You must be signed in to change notification settings - Fork 93
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
Explore Terraform CDK #327
Comments
Some updatesCDK for Terraform generates Terraform configuration to enable provisioning with Terraform. The adaptor works with any existing provider and modules hosted in the Terraform Registry. The core Terraform workflow remains the same, with the ability to plan changes before applying.
The CDK for Terraform project includes two packages:
Terraform CDK generates a Terraform configuration in JSON, based on a To initialize a new project or specify a new template you can type: (providing the description and project names are option, but dispense the interactive mode) Several steps occur when running
├── .gen
│ └── providers
│ └── ...
│ │ └── modules
├── .terraform
├── cdktf.json
├── help
├── main.(ts/py)
├── package.json
└── tsconfig.json (or pyconfig.json) Here you can check a similar initial deploymet I did for testing: https://github.com/viniciusdc/terraform_cdk/tree/main/cdk-qhub-example Based on the modifications specified in the To deploy the generated configuration, we can use the Terraform CLI commands to provision infrastructure resources or the general Terraform syntax: cd cdktf.out
terraform plan
terraform apply
terraform destroy The general configuration and necessary docs I found so far include, how to use the provides and modules, handle outputs, variables. The next steps are:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I spent quite some time researching this issue. And I'd like to turn this into a discussion. Some background on why this issue is so import to QHub. Qhub has several stages:
We have been working hard to support many features within our terraform modules:
We have faced many issue with this design:
Doing enterprise deployments of QHub have really made this issue tough to deal with. All customers have different needs, use different clouds, prefer to use an existing vpc etc. Some of the issues related to this:
Point is there are a long list of issues that relate to the customizability and extensibility of QHub. Having the ability to write the resources in python has huge advantages and there are several projects that do this. These include:
I think the main argument around using something like this is that it makes the infrastructure files now dependent on a specific language. I've looked at all three and let me briefly include my thoughts pros/cons:
All of these could solve the problems that we have. I however have enjoyed terraformpy. Here is an example of how I envision it extending qhub. In the sort term we could eliminate the use of cookiecutter. Later in the future I believe we could stop using terraform modules all together. See example https://github.com/costrouc/terraformpy-qhub-example |
Closing since we have a viable solution that does not require terrafirmcdk with #1003. |
https://www.hashicorp.com/blog/cdk-for-terraform-enabling-python-and-typescript-support
The text was updated successfully, but these errors were encountered: