codec
codec

Reputation: 8816

Clearity on github structure for terraform template

I am trying to understand the readymade template for IBM Cloud at https://cam-proxy-ng.ng.bluemix.net/cam/instances/#!/deployTemplateEditorWithNoParam/7921d773a240309379cf2c31c8004c9a

which is Node.js on a Single VM.

When we go to the source code at git referred in this template https://github.com/camc-experimental/terraform-modules/blob/master/ibmcloud/virtual_guest/ there is a createVirtualGuest.tf file. I am trying to understand why the create virtual guest is on GIT and not on the .tf template on bluemix console? Why there are 2 files which as code for creation of virtual guest?

Upvotes: 0

Views: 46

Answers (1)

Andre Tost
Andre Tost

Reputation: 1

This has to do with the structure of a Terraform template. You can define fragments of a resource orchestration in so-called modules, which are stored as separate files, and then refer to them from within the template.

The way the CAM service currently works, you can only work on the master template within the service. Modules that are referenced cannot be edited in the service and are pulled in from Github.

This is not ideal, and it should allow browsing and editing modules, too, but that function is currently not supported.

Upvotes: 0

Related Questions