Skip to content

Commit 364e84c

Browse files
Revert "Revert "Deprecate legacy TF module variables for Folder units (#79)" (#81)" (#82)
This reverts commit 9f53c9a.
1 parent 9f53c9a commit 364e84c

File tree

6 files changed

+5
-50
lines changed

6 files changed

+5
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ There are four new parameters to configure organizational deployments on the clo
7171
3. `include_projects` - List of GCP Projects to deploy the Sysdig Secure for Cloud resources in.
7272
4. `exclude_projects` - List of GCP Projects to exclude deploying the Sysdig Secure for Cloud resources in.
7373

74-
**WARNING**: module variable `management_group_ids` will be DEPRECATED on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use `include_folders` instead to achieve the same deployment outcome.
74+
**DEPRECATION NOTICE**: module variable `management_group_ids` has been DEPRECATED and is no longer supported. Please work with Sysdig to migrate your Terraform installs to use `include_folders` instead to achieve the same deployment outcome.
7575

7676
**Note**: The modules under `modules/services/` folder are legacy installs and soon to be deprecated. Those modules are no longer used for Onboarding. Please use the corresponding feature modules as mentioned in `## Modules` section above for Modular Onboarding. It is the recommended form of Onboarding.
7777

modules/onboarding/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ resource |
8181
| <a name="input_organization_domain"></a> [organization\_domain](#input\_organization\_domain) | Organization domain. e.g. sysdig.com | `string` | `""` | no |
8282
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | (Required) Target Project identifier provided by the customer | `string` | n/a | yes |
8383
| <a name="input_suffix"></a> [suffix](#input\_suffix) | (Optional) Suffix to uniquely identify resources during multiple installs. If not provided, random value is autogenerated | `string` | `null` | no |
84-
| <a name="input_management_group_ids"></a> [suffix](#input\_management\_group\_ids) | TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_folders` instead.<br>List of management group ids w.r.t an org install. If not provided, set to empty by default | `set(string)` | `[]` | no |
8584
| <a name="input_include_folders"></a> [suffix](#input\_include\_folders) | folders to include for organization in the format 'folders/{folder_id}'. i.e: folders/123456789012 | `set(string)` | `[]` | no |
8685
| <a name="input_exclude_folders"></a> [suffix](#input\_exclude\_folders) | folders to exclude for organization in the format 'folders/{folder_id}'. i.e: folders/123456789012 | `set(string)` | `[]` | no |
8786
| <a name="input_include_projects"></a> [suffix](#input\_include\_projects) | projects to include for organization. i.e: my-project-id | `set(string)` | `[]` | no |

modules/onboarding/locals.tf

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,8 @@
11
locals {
2-
# check if both old and new include/exclude org parameters are used, we fail early
3-
both_org_configuration_params = var.is_organizational && length(var.management_group_ids) > 0 && (
4-
length(var.include_folders) > 0 ||
5-
length(var.exclude_folders) > 0 ||
6-
length(var.include_projects) > 0 ||
7-
length(var.exclude_projects) > 0
8-
)
9-
102
# add 'folders/' prefix to the include/exclude folders
113
prefixed_include_folders = [for folder_id in var.include_folders : "folders/${folder_id}"]
124
prefixed_exclude_folders = [for folder_id in var.exclude_folders : "folders/${folder_id}"]
135

14-
# check if old management_group_ids parameter is provided, for backwards compatibility we will always give preference to it
15-
check_old_management_group_ids_param = var.is_organizational && length(var.management_group_ids) > 0
16-
176
# fetch the GCP root org
187
root_org = var.is_organizational ? [data.google_organization.org[0].name] : []
198
}
20-
21-
check "validate_org_configuration_params" {
22-
assert {
23-
condition = length(var.management_group_ids) == 0 # if this condition is false we throw warning
24-
error_message = <<-EOT
25-
WARNING: TO BE DEPRECATED 'management_group_ids' on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use 'include_folders' instead.
26-
EOT
27-
}
28-
29-
assert {
30-
condition = !local.both_org_configuration_params # if this condition is false we throw error
31-
error_message = <<-EOT
32-
ERROR: If both management_group_ids and include_folders/exclude_folders/include_projects/exclude_projects variables are populated,
33-
ONLY management_group_ids will be considered. Please use only one of the two methods.
34-
35-
Note: management_group_ids is going to be DEPRECATED 'management_group_ids' on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs.
36-
EOT
37-
}
38-
}

modules/onboarding/organizational.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ resource "sysdig_secure_organization" "google_organization" {
3030
count = var.is_organizational ? 1 : 0
3131

3232
management_account_id = sysdig_secure_cloud_auth_account.google_account.id
33-
organizational_unit_ids = local.check_old_management_group_ids_param ? var.management_group_ids : []
3433
organization_root_id = local.root_org[0]
35-
included_organizational_groups = local.check_old_management_group_ids_param ? [] : local.prefixed_include_folders
36-
excluded_organizational_groups = local.check_old_management_group_ids_param ? [] : local.prefixed_exclude_folders
37-
included_cloud_accounts = local.check_old_management_group_ids_param ? [] : var.include_projects
38-
excluded_cloud_accounts = local.check_old_management_group_ids_param ? [] : var.exclude_projects
34+
included_organizational_groups = local.prefixed_include_folders
35+
excluded_organizational_groups = local.prefixed_exclude_folders
36+
included_cloud_accounts = var.include_projects
37+
excluded_cloud_accounts = var.exclude_projects
3938
automatic_onboarding = var.enable_automatic_onboarding
4039
depends_on = [
4140
google_organization_iam_member.browser,

modules/onboarding/variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ variable "organization_domain" {
1515
default = ""
1616
}
1717

18-
variable "management_group_ids" {
19-
description = <<-EOF
20-
TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_folders` instead.
21-
When set, restrict onboarding to a set of folder identifiers whose child projects and projects are to be onboarded. e.g. ["organizations/123456789012"], ["folders/123456789012"]
22-
Default: onboard all folders.
23-
EOF
24-
type = set(string)
25-
default = []
26-
}
27-
2818
variable "suffix" {
2919
type = string
3020
description = "Suffix to uniquely identify resources during multiple installs. If not provided, random value is autogenerated"

test/examples/modular_organization/onboarding_with_posture.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ module "onboarding" {
2323
is_organizational = true
2424
organization_domain = "draios.com"
2525

26-
# legacy include/exclude org install params
27-
# management_group_ids = ["folders/123456789012"]
28-
2926
# include/exclude parameters
3027
include_folders = ["123456789012", "12345678911"]
3128
exclude_folders = []

0 commit comments

Comments
 (0)