observe_link¶
A link connects two datasets through a resource key.
Example Usage¶
data "observe_workspace" "default" {
name = "Default"
}
data "observe_dataset" "container" {
workspace = data.observe_workspace.default.oid
name = "Container"
}
data "observe_dataset" "node" {
workspace = data.observe_workspace.default.oid
name = "Node"
}
resource "observe_link" "container_to_node" {
workspace = data.observe_workspace.default.oid
source = data.observe_dataset.container.oid
target = data.observe_dataset.node.oid
/* The container dataset has `clusterUid` and `nodeName` as columns,
* whereas the node dataset has declared `clusterUid` and `name` as a key.
*/
fields = ["clusterUid", "nodeName:name"]
}
Schema¶
Required¶
fields
(List of String) A collection of field mappings on which to link source and target datasets. Each element of the array can be written as a colon separated string, e.g.source_column:target_column
. If the source and target fields have the same name, the target field name can be omitted, i.e.col:col
can be written ascol
.source
(String) OID for the source dataset.target
(String) OID for the target dataset.workspace
(String) OID of the workspace this object is contained in.
Optional¶
label
(String) A human-readable label for the link.
Read-Only¶
id
(String) The ID of this resource.oid
(String) OID (Observe ID) for this object. This is the canonical identifier that should be used when referring to this object in terraform manifests.
Import¶
Import is supported using the following syntax:
terraform import observe_link.example 1414010