parent
28f02688ee
commit
11b9319043
|
@ -15,15 +15,15 @@ A good usage pattern would be when we want all the projects under a specific fol
|
|||
|
||||
```hcl
|
||||
module "my-org" {
|
||||
source = "./fabric/modules/projects-data-source"
|
||||
parent = "organizations/123456789"
|
||||
source = "./fabric/modules/projects-data-source"
|
||||
parent = var.organization_id
|
||||
}
|
||||
|
||||
output "project_numbers" {
|
||||
value = module.my-org.project_numbers
|
||||
}
|
||||
|
||||
# tftest skip (uses data sources)
|
||||
# tftest skip (uses data sources) e2e
|
||||
```
|
||||
|
||||
### My dev projects based on parent and label
|
||||
|
@ -31,22 +31,22 @@ output "project_numbers" {
|
|||
```hcl
|
||||
module "my-dev" {
|
||||
source = "./fabric/modules/projects-data-source"
|
||||
parent = "folders/123456789"
|
||||
query = "labels.env:DEV state:ACTIVE"
|
||||
parent = var.folder_id
|
||||
query = "labels.env:DEV state:ACTIVE"
|
||||
}
|
||||
|
||||
output "dev-projects" {
|
||||
value = module.my-dev.projects
|
||||
}
|
||||
|
||||
# tftest skip (uses data sources)
|
||||
# tftest skip (uses data sources) e2e
|
||||
```
|
||||
|
||||
### Projects under org with folder/project exclusions
|
||||
```hcl
|
||||
module "my-filtered" {
|
||||
source = "./fabric/modules/projects-data-source"
|
||||
parent = "organizations/123456789"
|
||||
parent = var.organization_id
|
||||
ignore_projects = [
|
||||
"sandbox-*", # wildcard ignore
|
||||
"project-full-id", # specific project id
|
||||
|
@ -54,11 +54,11 @@ module "my-filtered" {
|
|||
]
|
||||
|
||||
include_projects = [
|
||||
"sandbox-114", # include specific project which was excluded by wildcard
|
||||
"415216609246" # include specific project which was excluded by wildcard (by project number)
|
||||
"sandbox-114", # include specific project which was excluded by wildcard
|
||||
"415216609246" # include specific project which was excluded by wildcard (by project number)
|
||||
]
|
||||
|
||||
ignore_folders = [ # subfolders are ingoner as well
|
||||
ignore_folders = [ # subfolders are ingoner as well
|
||||
"343991594985",
|
||||
"437102807785",
|
||||
"345245235245"
|
||||
|
@ -70,8 +70,7 @@ output "filtered-projects" {
|
|||
value = module.my-filtered.projects
|
||||
}
|
||||
|
||||
# tftest skip (uses data sources)
|
||||
|
||||
# tftest skip (uses data sources) e2e
|
||||
```
|
||||
<!-- BEGIN TFDOC -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue