@mindfiredigital/adac-export-terraform
v0.0.1
Published
Export ADAC diagrams to Terraform HCL
Readme
@mindfiredigital/adac-export-terraform
Generate Terraform configuration from ADAC architecture definitions.
What It Does
This package converts ADAC services into Terraform HCL and returns three generated file contents:
mainTfvariablesTfoutputsTf
It is designed for file-based generation from ADAC YAML.
CLI Usage
This package is also wired into the ADAC CLI as a standalone Terraform generation command:
pnpm cli terraform .\yamls\aws.adac.yamlTo choose a custom output directory:
pnpm cli terraform .\yamls\aws.adac.yaml --output .\temp-terraform-outputThis generates:
main.tfvariables.tfoutputs.tf
Module Support
If a service includes:
config:
module:
source: 'terraform-aws-modules/vpc/aws'
inputs:
name: 'main-vpc'
cidr: '10.0.0.0/16'the exporter will generate a Terraform module block instead of the normal
resource mapping for that service.
To pass a raw Terraform expression into a module input, wrap it like this:
config:
module:
source: 'terraform-aws-modules/security-group/aws'
inputs:
vpc_id:
terraform: 'aws_vpc.vpc_main.id'