@@ -14,30 +14,48 @@ variable "root_parent_management_group_id" {
1414 default = " "
1515}
1616
17+ variable "subscription_ids" {
18+ description = " The list of subscription IDs to deploy the Platform Landing Zones into"
19+ type = map (string )
20+ default = {}
21+ nullable = false
22+ validation {
23+ condition = length (var. subscription_ids ) == 0 || alltrue ([for id in values (var. subscription_ids ) : can (regex (" ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" , id))])
24+ error_message = " All subscription IDs must be valid GUIDs"
25+ }
26+ validation {
27+ condition = length (var. subscription_ids ) == 0 || alltrue ([for id in keys (var. subscription_ids ) : contains ([" management" , " connectivity" , " identity" , " security" ], id)])
28+ error_message = " The keys of the subscription_ids map must be one of 'management', 'connectivity', 'identity' or 'security'"
29+ }
30+ }
31+
1732variable "subscription_id_connectivity" {
18- description = " The identifier of the Connectivity Subscription"
33+ description = " DEPRECATED (use subscription_ids instead): The identifier of the Connectivity Subscription"
1934 type = string
35+ default = null
2036 validation {
21- condition = can (regex (" ^[0-9a-fA-F-]{36} $" , var. subscription_id_connectivity ))
22- error_message = " The bootstrap subscription ID must be a valid GUID"
37+ condition = var . subscription_id_connectivity == null || can (regex (" ^( [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}) $" , var. subscription_id_connectivity ))
38+ error_message = " The subscription ID must be a valid GUID"
2339 }
2440}
2541
2642variable "subscription_id_identity" {
27- description = " The identifier of the Identity Subscription"
43+ description = " DEPRECATED (use subscription_ids instead): The identifier of the Identity Subscription"
2844 type = string
45+ default = null
2946 validation {
30- condition = can (regex (" ^[0-9a-fA-F-]{36} $" , var. subscription_id_identity ))
31- error_message = " The bootstrap subscription ID must be a valid GUID"
47+ condition = var . subscription_id_identity == null || can (regex (" ^( [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}) $" , var. subscription_id_identity ))
48+ error_message = " The subscription ID must be a valid GUID"
3249 }
3350}
3451
3552variable "subscription_id_management" {
36- description = " The identifier of the Management Subscription"
53+ description = " DEPRECATED (use subscription_ids instead): The identifier of the Management Subscription"
3754 type = string
55+ default = null
3856 validation {
39- condition = can (regex (" ^[0-9a-fA-F-]{36} $" , var. subscription_id_management ))
40- error_message = " The bootstrap subscription ID must be a valid GUID"
57+ condition = var . subscription_id_management == null || can (regex (" ^( [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}) $" , var. subscription_id_management ))
58+ error_message = " The subscription ID must be a valid GUID"
4159 }
4260}
4361
0 commit comments