@@ -15,51 +15,51 @@ A good usage pattern would be when we want all the projects under a specific fol
15
15
16
16
``` hcl
17
17
module "my-org" {
18
- source = "./fabric/modules/projects-data-source"
19
- parent = "organizations/123456789"
18
+ source = "./fabric/modules/projects-data-source"
19
+ parent = var.organization_id
20
20
}
21
21
22
22
output "project_numbers" {
23
23
value = module.my-org.project_numbers
24
24
}
25
25
26
- # tftest skip (uses data sources)
26
+ # tftest skip (uses data sources) e2e
27
27
```
28
28
29
29
### My dev projects based on parent and label
30
30
31
31
``` hcl
32
32
module "my-dev" {
33
33
source = "./fabric/modules/projects-data-source"
34
- parent = "folders/123456789"
35
- query = "labels.env:DEV state:ACTIVE"
34
+ parent = var.folder_id
35
+ query = "labels.env:DEV state:ACTIVE"
36
36
}
37
37
38
38
output "dev-projects" {
39
39
value = module.my-dev.projects
40
40
}
41
41
42
- # tftest skip (uses data sources)
42
+ # tftest skip (uses data sources) e2e
43
43
```
44
44
45
45
### Projects under org with folder/project exclusions
46
46
``` hcl
47
47
module "my-filtered" {
48
48
source = "./fabric/modules/projects-data-source"
49
- parent = "organizations/123456789"
49
+ parent = var.organization_id
50
50
ignore_projects = [
51
51
"sandbox-*", # wildcard ignore
52
52
"project-full-id", # specific project id
53
53
"0123456789" # specific project number
54
54
]
55
55
56
56
include_projects = [
57
- "sandbox-114", # include specific project which was excluded by wildcard
58
- "415216609246" # include specific project which was excluded by wildcard (by project number)
57
+ "sandbox-114", # include specific project which was excluded by wildcard
58
+ "415216609246" # include specific project which was excluded by wildcard (by project number)
59
59
]
60
60
61
- ignore_folders = [ # subfolders are ingoner as well
62
- "343991594985",
61
+ ignore_folders = [ # subfolders are ingoner as well
62
+ "343991594985",
63
63
"437102807785",
64
64
"345245235245"
65
65
]
@@ -70,8 +70,7 @@ output "filtered-projects" {
70
70
value = module.my-filtered.projects
71
71
}
72
72
73
- # tftest skip (uses data sources)
74
-
73
+ # tftest skip (uses data sources) e2e
75
74
```
76
75
<!-- BEGIN TFDOC -->
77
76
0 commit comments