Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Generic data sources #349

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions caf_launchpad/data_sources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module "data_sources" {
source = "../data_sources"
for_each = can(var.data_sources) ? toset(["data"]) : []

data_sources = var.data_sources
}

locals {
data_sources = module.data_sources
}
1 change: 1 addition & 0 deletions caf_launchpad/landingzone.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module "launchpad" {

current_landingzone_key = var.landingzone.key
custom_role_definitions = var.custom_role_definitions
data_sources = try(local.data_sources.data, {})
enable = var.enable
event_hub_namespaces = var.event_hub_namespaces
global_settings = local.global_settings
Expand Down
6 changes: 5 additions & 1 deletion caf_launchpad/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,14 @@ variable "network_profiles" {
default = {}
}

variable "data_sources" {
description = "Data gathering for resources not managed by CAF Module"
default = {}
}
variable "virtual_hub_connections" {
default = {}
}

variable "custom_variables" {
default = {}
}
}
10 changes: 10 additions & 0 deletions caf_solution/data_sources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module "data_sources" {
source = "../data_sources"
for_each = can(var.data_sources) ? toset(["data"]) : []

data_sources = var.data_sources
}

locals {
data_sources = module.data_sources
}
1 change: 1 addition & 0 deletions caf_solution/landingzone.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "solution" {
current_landingzone_key = try(var.landingzone.key, var.landingzone[var.backend_type].key)
custom_role_definitions = var.custom_role_definitions
data_factory = local.data_factory
data_sources = try(local.data_sources.data, {})
database = local.database
data_protection = local.data_protection
diagnostic_storage_accounts = var.diagnostic_storage_accounts
Expand Down
5 changes: 5 additions & 0 deletions caf_solution/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,8 @@ variable "propagate_launchpad_identities" {
variable "random_strings" {
default = {}
}

variable "data_sources" {
description = "Data gathering for resources not managed by CAF Module"
default = {}
}
Loading