Skip to main content

Transform ROS-Wrapped Terraform Template to Terraform Template

Command

Using the following command generates Terraform files in the current directory based on the ROS-Wrapped Terraform template:

rostran transform template.yaml

You can explicitly specify the path to generate the Terraform template through --target-path:

rostran transform template.yaml --target-path ./terraform

ROS-Wrapped Template

  • template.yaml
ROSTemplateFormatVersion: '2015-09-01'
Transform: Aliyun::Terraform-v1.5
Workspace:
main.tf: |-
resource "alicloud_vpc" "vpc" {
vpc_name = "vpc_test"
}
outputs.tf: |-
output "vpc_id" {
value = alicloud_vpc.vpc.id
}

Transformed Terraform Template

  • main.tf
resource "alicloud_vpc" "vpc" {
vpc_name = "vpc_test"
}
  • output.tf
output "vpc_id" {
value = alicloud_vpc.vpc.id
}