From 645275a9cf03f3076a0f2ed6d709309a324a82f0 Mon Sep 17 00:00:00 2001 From: Dinesh Kumar Baskar Date: Thu, 14 Mar 2024 22:30:59 +0100 Subject: [PATCH 1/2] projects-data-source e2e tests --- modules/projects-data-source/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/projects-data-source/README.md b/modules/projects-data-source/README.md index 93dd67f434..f74ec15fa6 100644 --- a/modules/projects-data-source/README.md +++ b/modules/projects-data-source/README.md @@ -16,14 +16,14 @@ 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" + 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,7 +31,7 @@ output "project_numbers" { ```hcl module "my-dev" { source = "./fabric/modules/projects-data-source" - parent = "folders/123456789" + parent = var.folder_id query = "labels.env:DEV state:ACTIVE" } @@ -39,14 +39,14 @@ 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 @@ -70,7 +70,7 @@ output "filtered-projects" { value = module.my-filtered.projects } -# tftest skip (uses data sources) +# tftest skip (uses data sources) e2e ``` From 8073dccd31cb3a4465261265fffdafc64250a385 Mon Sep 17 00:00:00 2001 From: Dinesh Kumar Baskar Date: Thu, 14 Mar 2024 23:10:17 +0100 Subject: [PATCH 2/2] projects-data-source e2e --- modules/projects-data-source/README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/projects-data-source/README.md b/modules/projects-data-source/README.md index f74ec15fa6..c5a19d76c4 100644 --- a/modules/projects-data-source/README.md +++ b/modules/projects-data-source/README.md @@ -15,8 +15,8 @@ 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 = var.organization_id + source = "./fabric/modules/projects-data-source" + parent = var.organization_id } output "project_numbers" { @@ -32,7 +32,7 @@ output "project_numbers" { module "my-dev" { source = "./fabric/modules/projects-data-source" parent = var.folder_id - query = "labels.env:DEV state:ACTIVE" + query = "labels.env:DEV state:ACTIVE" } output "dev-projects" { @@ -46,7 +46,7 @@ output "dev-projects" { ```hcl module "my-filtered" { source = "./fabric/modules/projects-data-source" - parent = var.organization_id + parent = var.organization_id ignore_projects = [ "sandbox-*", # wildcard ignore "project-full-id", # specific project id @@ -54,12 +54,12 @@ 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 - "343991594985", + ignore_folders = [ # subfolders are ingoner as well + "343991594985", "437102807785", "345245235245" ] @@ -71,7 +71,6 @@ output "filtered-projects" { } # tftest skip (uses data sources) e2e - ```