Once Terraform Exporter Utility is configured, export Environment Variables and execute listed commands.
cd tenant-terraform-generator
make run
New Folders would be available under tenant-terraform-generator/target/<customer-name>/<tenant>
Under terraform
folder, admin-tenant, aws-services and app projects would be available. These projects would be referenced later to create new tenants and resources.
admin-tenant: This project manages the creation of DuploCloud tenant and tenant-related resources.
aws-services: This project manages data services like Redis, RDS, Kafka, S3 buckets, Cloudfront, EMR and Elastic Search inside DuploCloud.
app: This project manages DuploCloud services like EKS, ECS.
DuploCloud provides a Terraform Exporter Utility to export the terraform code that represents the infrastructure deployed in a DuploCloud Tenant.
This is often very useful in order to:
Generate and persist DuploCloud Terraform IaC which can be version controlled in the future.
Clone a new Tenant based on an already existing Tenant.
Before you begin to install the utility, you must have certain prerequisites in place.
https://github.com/duplocloud/tenant-terraform-generator.git
DuploCloud Terraform Exporter Utility provides scripts to create Infrastructure based on Tenant, using the . Executing the scripts creates Tenant, Services, and Applications. These resources can be viewed in DuploCloud Portal.
Follow the sequence based on the Project (admin-tenant
, aws-services
and app).
Perform plan and apply actions in one project prior to switching another project.
Export following environment variables in the shell while running the terraform projects.
Environment Details can be found .
This project manages the creation of DuploCloud tenant and resources related to the tenant.
Execute Script in this sequence:
cd target/customer-name/tenant-name
Dry-Run and Review
scripts/plan.sh <new tenant name> admin-tenant
Deploy Resources
scripts/apply.sh <new tenant name> admin-tenant
This project manages data services like Redis, RDS, Kafka, S3 buckets, Cloudfront, EMR and Elastic Search inside DuploCloud.
This project manages containerized applications inside DuploCloud like EKS Services, ECS, docker native service.
Follow the below Project sequence (app, aws-services and admin-tenant) while deleting the resources:
scripts/destroy.sh <new tenant name created above> app
scripts/destroy.sh <new tenant name created above> aws-services
scripts/destroy.sh <new tenant name created above> admin-tenant
While executing the Utility, If you encounter an issue, we suggest referring the following guide to help you troubleshoot.