(work in progress)
TOSCA for Terraform
Enable TOSCA
for Terraform
using Puccini.
Two main features are supported:
TOSCA Preprocessor
Generate a Terraform module from TOSCA. Included is a Terraform profile. For example, this TOSCA:
tosca_definitions_version: tosca_simple_yaml_1_3
imports:
- file: profiles/terraform/profile.yaml
namespace_prefix: tf
topology_template:
node_templates:
hello:
type: tf:LocalFile
properties:
filename: ./artifacts/hello.txt
content: Hello World!
would become this Terraform module:
resource local_file hello {
filename = "./artifacts/hello.txt"
content = "Hello World!"
}
TOSCA Provider
A Terraform resource that represents a TOSCA service template. Currently we simply compile it to a Clout,
but in the future we hope to allow integration with TOSCA orchestrators, such as
Turandot. Example:
terraform {
required_providers {
tosca = {
source = "puccini/tosca"
}
}
}
resource tosca_clout hello {
service_template = "./hello.csar"
}
output clout {
value = tosca_clout.hello
}