You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/space_by_path.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,15 @@ page_title: "spacelift_space_by_path Data Source - terraform-provider-spacelift"
4
4
subcategory: ""
5
5
description: |-
6
6
spacelift_space_by_path represents a Spacelift space - a collection of resources such as stacks, modules, policies, etc. Allows for more granular access control. Can have a parent space. In contrary to spacelift_space, this resource is identified by a path, not by an ID. For this data source to work, path must be unique. If there are multiple spaces with the same path, this datasource will fail.
7
+
This data source can be used either with absolute paths (starting with root) or relative paths. In the latter case, the path is relative to the current space the spacelift run is.
7
8
Disclaimer:
8
9
This datasource can only be used in a stack that resides in a space with inheritance enabled. In addition, the parent spaces (excluding root) must also have inheritance enabled.
9
10
---
10
11
11
12
# spacelift_space_by_path (Data Source)
12
13
13
14
`spacelift_space_by_path` represents a Spacelift **space** - a collection of resources such as stacks, modules, policies, etc. Allows for more granular access control. Can have a parent space. In contrary to `spacelift_space`, this resource is identified by a path, not by an ID. For this data source to work, path must be unique. If there are multiple spaces with the same path, this datasource will fail.
15
+
This data source can be used either with absolute paths (starting with `root`) or relative paths. In the latter case, the path is relative to the current space the spacelift run is.
14
16
**Disclaimer:**
15
17
This datasource can only be used in a stack that resides in a space with inheritance enabled. In addition, the parent spaces (excluding root) must also have inheritance enabled.
16
18
@@ -24,6 +26,11 @@ data "spacelift_space_by_path" "space" {
24
26
output "space_description" {
25
27
value = data.spacelift_space_by_path.space.description
26
28
}
29
+
30
+
// Assuming this data source is invoked in a run that belongs to a stack in a space located at "root", then the following data source shall be equal to the one above.
// Assuming this data source is invoked in a run that belongs to a stack in a space located at "root", then the following data source shall be equal to the one above.
Description: "`spacelift_space_by_path` represents a Spacelift **space** - "+
19
19
"a collection of resources such as stacks, modules, policies, etc. Allows for more granular access control. Can have a parent space. In contrary to `spacelift_space`, this resource is identified by a path, not by an ID. "+
20
20
"For this data source to work, path must be unique. If there are multiple spaces with the same path, this datasource will fail. \n"+
21
+
"This data source can be used either with absolute paths (starting with `root`) or relative paths. In the latter case, the path is relative to the current space the spacelift run is. \n"+
21
22
"**Disclaimer:** \n"+
22
23
"This datasource can only be used in a stack that resides in a space with inheritance enabled. In addition, the parent spaces (excluding root) must also have inheritance enabled.",
0 commit comments