The terraform-mps-plugin is one of many plugins of the DeMAF project. It is designed to transform Terraform deployment models into an EDMM representation. OpenTofu templates should work as well.
The plugin only works (without adaptions) in the context of the entire DeMAF application using the deployment-config. The documentation for setting up the entire DeMAF application locally is here.
You can run the application without the deployment-config, but it will not run as it needs to register itself at the analysis-manager.
If you want to boot it locally nevertheless use the following commands.
./mvnw spring-boot:run
or to use the built package:
./mvnw package
java -jar target/terraform-plugin-0.2.0-SNAPSHOT.jar
This plugin uses JetBrains MPS to facilitate the model-to-model transformation from Terraform to EDMM. The matching MPS project is located in another git repository and must be added as a submodule (you can also clone via https):
git submodule add [email protected]:UST-DeMAF/mps-transformation-terraform.git mps-transformation-terraform
To update the MPS application to a new version, execute:
git submodule update --remote
This plugin has some minor specialities compared to other DeMAF transformation plugins:
- Post-Processing Component-Types: The EDMM component types generated in the MPS transformation are unique and matching to each resource. However, they are post-processed and merged into a single representation afterward, if possible.
- Ontological Post-Processors: The transformation of MPS is not the final result, as there are several post-processors dealing with ontological parts of the transformation. Each post-processor scans the yaml file for specific resource-types and refines the output if it matches.
When running the project locally using e.g. IntelliJ IDEA or from the command-line, make sure that the plugin is not also running in a Docker container, launched by the deployment-config, otherwise the port is blocked.