Package Terraform templates in a deployable Microtica Component.
To use this step, you would need to have an existing Terraform templates hosted on your Git account.
The parameters you define in variables.tf will automatically become an input parameters of the component and parameters defined in the outputs.tf will become the output parameters of the component. The actual values should be specified in the Microtica Portal.
You should always have your variables.tf and outputs.tf files in the root directory.
steps: step-name: type: terraform-build
|title||The display name of the step.||No|
|type||The type of the Microtica built-in step.|
Should always be terraform-build for this type of step.
#Package templates into Component
In the following example we define a pipeline that pulls the code from a Git repository then packages the Terraform templates into a Component.
We just need to specify the step and everything else will be handled by the terraform-build built-in step.
steps: Clone: title: Clone my source code from Git type: git-clone Package: title: Package my CFN template into Microtica Component type: terraform-build
Create a pipeline with the above spec and trigger the initial pipeline run.
Now we need to create a component in Microtica Portal and connect it with the pipeline you just created.
To create a component click on Components under Infrastructure from the side bar.
Enter a name, type and description for the component. Then select the pipeline from the dropdown and select the step of type terraform-build, in our case that’s the Package step.
Click on Create Component button at the bottom.
Now the component is ready to be added in an environment and deployed in the cloud.