ibm-cloud-docs / schematics

schematics
Other
1 stars 10 forks source link

Example which references .template_id from ibm.schematics_workspace doesn't work #15

Closed ileneruth closed 3 years ago

ileneruth commented 3 years ago

The remotestate.tf example has the following:

data "ibm_schematics_output" "vpc" {
     workspace_id = "<schematics_workspace_ID>"
     template_id  = data.ibm_schematics_workspace.vpc.template_id.0
 }

However, when I try this, it fails, saying that there's no template_attribute on the workspace.

Examining the terraform attributes described here: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/schematics_workspace

I found that I had to replace

 template_id  = data.ibm_schematics_workspace.vpc.template_id.0

with

template_id = data.ibm_schematics_workspace.vpc.runtime_data.0.id

to get it to work.

Note that this also affects the documentation for ibm_schematics_output on registry.terraform.io which is not aligned with the actual available attributes.

geethasathyamurthy commented 3 years ago

@ileneruth

Thanks much for sharing the observation, we have updated in the documentation. Here is the updated link https://cloud.ibm.com/docs/schematics?topic=schematics-remote-state.

Request to close the issue, if the edit is good.

Thanks, Geetha

ileneruth commented 3 years ago

Looks good now, thanks.