apiterraformcloud-automation-manager

Can I pass some custom variables to CAM via the API?


I'm using the CAM beta on ICP 2.1 beta RC2

(https://www-01.ibm.com/marketing/iwm/iwmdocs/web/cc/earlyprograms/cloud/cam/index.shtml)

Can I pass some custom variables to CAM via the API ?

E.g - if I want to pass this value as some custom tform variable ?

server_url = “https://the.ip.add.ress:443/organizations/sr_org_swis” 

Solution

  • I found the answer is that: provider attributes can reference variables too. eg:

    variable "vsphere_server" {
        description = "Server Name"
    }
    provider "vsphere" {
      vsphere_server = "${var.vsphere_server}"
    }
    

    So, if your template will look like this, after you import it, the vsphere_server will be shown in the Template Parameters page and you can pass in a value that will overwrite the vsphere_server that comes with the cloud connection.