diff --git a/README.md b/README.md
index 31d8376..5267161 100644
--- a/README.md
+++ b/README.md
@@ -73,7 +73,7 @@ There are four new parameters to configure organizational deployments on the clo
3. `include_accounts` - List of AWS Accounts to deploy the Sysdig Secure for Cloud resources in.
4. `exclude_accounts` - List of AWS Accounts to exclude deploying the Sysdig Secure for Cloud resources in.
-**WARNING**: module variable `organizational_unit_ids` / `org_units` will be DEPRECATED on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use `include_ouids` instead to achieve the same deployment outcome.
+**DEPRECATION NOTICE**: module variables `organizational_unit_ids` / `org_units` have been DEPRECATED and are no longer supported. Please work with Sysdig to migrate your Terraform installs to use `include_ouids` instead to achieve the same deployment outcome.
### Stackset Instances Installation
diff --git a/modules/agentless-scanning/README.md b/modules/agentless-scanning/README.md
index 4f39374..dec59c8 100644
--- a/modules/agentless-scanning/README.md
+++ b/modules/agentless-scanning/README.md
@@ -62,7 +62,6 @@ No modules.
| [kms\_key\_deletion\_window](#input\_kms\_key\_deletion\_window) | Deletion window for shared KMS key | `number` | `7` | no |
| [mgt\_stackset](#input\_mgt\_stackset) | (Optional) Indicates if the management stackset should be deployed | `bool` | `true` | no |
| [name](#input\_name) | The name of the installation. Assigned to most child resource(s) | `string` | `"sysdig-secure-scanning"` | no |
-| [org\_units](#input\_org\_units) | TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.
(Optional) List of Organization Unit IDs in which to setup Agentless Scanning. By default, Agentless Scanning will be setup in all accounts within the Organization. This field is ignored if `is_organizational = false` | `set(string)` | `[]` | no |
| [regions](#input\_regions) | (Optional) List of regions in which to install Agentless Scanning | `set(string)` | `[]` | no |
| [scanning\_account\_id](#input\_scanning\_account\_id) | The identifier of the account that will receive volume snapshots | `string` | `"878070807337"` | no |
| [stackset\_admin\_role\_arn](#input\_stackset\_admin\_role\_arn) | (Optional) stackset admin role to run SELF\_MANAGED stackset | `string` | `""` | no |
diff --git a/modules/agentless-scanning/locals.tf b/modules/agentless-scanning/locals.tf
index e0649a5..3257726 100644
--- a/modules/agentless-scanning/locals.tf
+++ b/modules/agentless-scanning/locals.tf
@@ -7,41 +7,11 @@ data "aws_organizations_organization" "org" {
}
locals {
- # check if both old and new org parameters are provided, we fail early
- both_org_configuration_params = var.is_organizational && length(var.org_units) > 0 && (
- length(var.include_ouids) > 0 ||
- length(var.exclude_ouids) > 0 ||
- length(var.include_accounts) > 0 ||
- length(var.exclude_accounts) > 0
- )
-
- # check if old org_units parameter is provided, for backwards compatibility we will always give preference to it
- check_old_ouid_param = var.is_organizational && length(var.org_units) > 0
-
# fetch the AWS Root OU under org
# As per https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#organization-structure, there can be only one root
root_org_unit = var.is_organizational ? [for root in data.aws_organizations_organization.org[0].roots : root.id] : []
}
-check "validate_org_configuration_params" {
- assert {
- condition = length(var.org_units) == 0 # if this condition is false we throw warning
- error_message = <<-EOT
- WARNING: TO BE DEPRECATED 'org_units' on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use 'include_ouids' instead.
- EOT
- }
-
- assert {
- condition = !local.both_org_configuration_params # if this condition is false we throw error
- error_message = <<-EOT
- ERROR: If both org_units and include_ouids/exclude_ouids/include_accounts/exclude_accounts variables are populated,
- ONLY org_units will be considered. Please use only one of the two methods.
-
- Note: org_units is going to be DEPRECATED on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs.
- EOT
- }
-}
-
# *****************************************************************************************************************************************************
# INCLUDE/EXCLUDE CONFIGURATION SUPPORT
#
@@ -67,27 +37,22 @@ check "validate_org_configuration_params" {
locals {
# OU CONFIGURATION (determine user provided org configuration)
org_configuration = (
- # case1 - if old method is used where ONLY org_units is provided, use those
- local.check_old_ouid_param ? (
- "old_ouid_param"
+ # case1 - if no include/exclude ous provided, include entire org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
+ "entire_org"
) : (
- # case2 - if no include/exclude ous provided, include entire org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
- "entire_org"
+ # case2 - if only included ouids provided, include those ous only
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
+ "included_ous_only"
) : (
- # case3 - if only included ouids provided, include those ous only
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
- "included_ous_only"
+ # case3 - if only excluded ouids provided, exclude their accounts from rest of org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
+ "excluded_ous_only"
) : (
- # case4 - if only excluded ouids provided, exclude their accounts from rest of org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
- "excluded_ous_only"
- ) : (
- # case5 - if both include and exclude ouids are provided, includes override excludes
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
- "mixed_ous"
- ) : ""
- )
+ # case4 - if both include and exclude ouids are provided, includes override excludes
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
+ "mixed_ous"
+ ) : ""
)
)
)
@@ -95,9 +60,6 @@ locals {
# switch cases for various user provided org configuration to be onboarded
deployment_options = {
- old_ouid_param = {
- org_units_to_deploy = var.org_units
- }
entire_org = {
org_units_to_deploy = local.root_org_unit
}
@@ -137,23 +99,18 @@ data "aws_organizations_organizational_unit_descendant_accounts" "ou_accounts_to
locals {
# ACCOUNTS CONFIGURATION (determine user provided accounts configuration)
accounts_configuration = (
- # case1 - if old method is used where ONLY org_units is provided, this configuration is a noop
- local.check_old_ouid_param ? (
- "NONE"
+ # case1 - if only included accounts provided, include those accts as well
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
+ "UNION"
) : (
- # case2 - if only included accounts provided, include those accts as well
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
- "UNION"
+ # case2 - if only excluded accounts or only excluded ouids provided, exclude those accounts
+ var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
+ "DIFFERENCE"
) : (
- # case3 - if only excluded accounts or only excluded ouids provided, exclude those accounts
- var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
- "DIFFERENCE"
- ) : (
- # case4 - if both include and exclude accounts are provided, includes override excludes
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
- "MIXED"
- ) : ""
- )
+ # case3 - if both include and exclude accounts are provided, includes override excludes
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
+ "MIXED"
+ ) : ""
)
)
)
@@ -163,10 +120,6 @@ locals {
# switch cases for various user provided accounts configuration to be onboarded
deployment_account_options = {
- NONE = {
- accounts_to_deploy = []
- account_filter_type = "NONE"
- }
UNION = {
accounts_to_deploy = var.include_accounts
account_filter_type = "UNION"
diff --git a/modules/agentless-scanning/organizational.tf b/modules/agentless-scanning/organizational.tf
index 75b500c..1b70b1a 100644
--- a/modules/agentless-scanning/organizational.tf
+++ b/modules/agentless-scanning/organizational.tf
@@ -192,8 +192,8 @@ resource "aws_cloudformation_stack_set_instance" "ou_stackset_instance" {
stack_set_name = aws_cloudformation_stack_set.ou_resources_stackset[0].name
deployment_targets {
organizational_unit_ids = [each.value[1]]
- accounts = local.check_old_ouid_param ? null : (local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy)
- account_filter_type = local.check_old_ouid_param ? null : local.deployment_targets_accounts_filter
+ accounts = local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy
+ account_filter_type = local.deployment_targets_accounts_filter
}
operation_preferences {
max_concurrent_percentage = 100
diff --git a/modules/agentless-scanning/variables.tf b/modules/agentless-scanning/variables.tf
index c8ac57d..dcd3e1f 100644
--- a/modules/agentless-scanning/variables.tf
+++ b/modules/agentless-scanning/variables.tf
@@ -30,16 +30,6 @@ variable "is_organizational" {
default = false
}
-variable "org_units" {
- description = <<-EOF
- TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.
- When set, list of Organization Unit IDs to setup Agentless Scanning. By default, Agentless Scanning will be setup in all accounts within the Organization.
- This field is ignored if `is_organizational = false`
- EOF
- type = set(string)
- default = []
-}
-
variable "regions" {
description = "(Optional) List of regions in which to install Agentless Scanning"
type = set(string)
diff --git a/modules/config-posture/README.md b/modules/config-posture/README.md
index 55b6512..0a305c5 100644
--- a/modules/config-posture/README.md
+++ b/modules/config-posture/README.md
@@ -52,7 +52,6 @@ No modules.
|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|-------------------------------------------------------------|:--------:|
| [failure\_tolerance\_percentage](#input\_failure\_tolerance\_percentage) | The percentage of accounts, per Region, for which stack operations can fail before AWS CloudFormation stops the operation in that Region | `number` | `90` | no |
| [is\_organizational](#input\_is\_organizational) | true/false whether secure-for-cloud should be deployed in an organizational setup (all accounts of org) or not (only on default aws provider account) | `bool` | `false` | no |
-| [org\_units](#input\_org\_units) | TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.
Org unit id to install cspm | `set(string)` | `[]` | no |
| [region](#input\_region) | Default region for resource creation in organization mode | `string` | `""` | no |
| [tags](#input\_tags) | sysdig secure-for-cloud tags. always include 'product' default tag for resource-group proper functioning | `map(string)` |
{
"product": "sysdig-secure-for-cloud"
} | no |
| [timeout](#input\_timeout) | Default timeout values for create, update, and delete operations | `string` | `"30m"` | no |
diff --git a/modules/config-posture/locals.tf b/modules/config-posture/locals.tf
index b69796e..1fe57f0 100644
--- a/modules/config-posture/locals.tf
+++ b/modules/config-posture/locals.tf
@@ -7,41 +7,11 @@ data "aws_organizations_organization" "org" {
}
locals {
- # check if both old and new org parameters are provided, we fail early
- both_org_configuration_params = var.is_organizational && length(var.org_units) > 0 && (
- length(var.include_ouids) > 0 ||
- length(var.exclude_ouids) > 0 ||
- length(var.include_accounts) > 0 ||
- length(var.exclude_accounts) > 0
- )
-
- # check if old org_units parameter is provided, for backwards compatibility we will always give preference to it
- check_old_ouid_param = var.is_organizational && length(var.org_units) > 0
-
# fetch the AWS Root OU under org
# As per https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#organization-structure, there can be only one root
root_org_unit = var.is_organizational ? [for root in data.aws_organizations_organization.org[0].roots : root.id] : []
}
-check "validate_org_configuration_params" {
- assert {
- condition = length(var.org_units) == 0 # if this condition is false we throw warning
- error_message = <<-EOT
- WARNING: TO BE DEPRECATED 'org_units' on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use 'include_ouids' instead.
- EOT
- }
-
- assert {
- condition = !local.both_org_configuration_params # if this condition is false we throw error
- error_message = <<-EOT
- ERROR: If both org_units and include_ouids/exclude_ouids/include_accounts/exclude_accounts variables are populated,
- ONLY org_units will be considered. Please use only one of the two methods.
-
- Note: org_units is going to be DEPRECATED on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs.
- EOT
- }
-}
-
# *****************************************************************************************************************************************************
# INCLUDE/EXCLUDE CONFIGURATION SUPPORT
#
@@ -67,27 +37,22 @@ check "validate_org_configuration_params" {
locals {
# OU CONFIGURATION (determine user provided org configuration)
org_configuration = (
- # case1 - if old method is used where ONLY org_units is provided, use those
- local.check_old_ouid_param ? (
- "old_ouid_param"
+ # case1 - if no include/exclude ous provided, include entire org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
+ "entire_org"
) : (
- # case2 - if no include/exclude ous provided, include entire org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
- "entire_org"
+ # case2 - if only included ouids provided, include those ous only
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
+ "included_ous_only"
) : (
- # case3 - if only included ouids provided, include those ous only
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
- "included_ous_only"
+ # case3 - if only excluded ouids provided, exclude their accounts from rest of org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
+ "excluded_ous_only"
) : (
- # case4 - if only excluded ouids provided, exclude their accounts from rest of org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
- "excluded_ous_only"
- ) : (
- # case5 - if both include and exclude ouids are provided, includes override excludes
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
- "mixed_ous"
- ) : ""
- )
+ # case4 - if both include and exclude ouids are provided, includes override excludes
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
+ "mixed_ous"
+ ) : ""
)
)
)
@@ -95,9 +60,6 @@ locals {
# switch cases for various user provided org configuration to be onboarded
deployment_options = {
- old_ouid_param = {
- org_units_to_deploy = var.org_units
- }
entire_org = {
org_units_to_deploy = local.root_org_unit
}
@@ -135,23 +97,18 @@ data "aws_organizations_organizational_unit_descendant_accounts" "ou_accounts_to
locals {
# ACCOUNTS CONFIGURATION (determine user provided accounts configuration)
accounts_configuration = (
- # case1 - if old method is used where ONLY org_units is provided, this configuration is a noop
- local.check_old_ouid_param ? (
- "NONE"
+ # case1 - if only included accounts provided, include those accts as well
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
+ "UNION"
) : (
- # case2 - if only included accounts provided, include those accts as well
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
- "UNION"
+ # case2 - if only excluded accounts or only excluded ouids provided, exclude those accounts
+ var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
+ "DIFFERENCE"
) : (
- # case3 - if only excluded accounts or only excluded ouids provided, exclude those accounts
- var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
- "DIFFERENCE"
- ) : (
- # case4 - if both include and exclude accounts are provided, includes override excludes
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
- "MIXED"
- ) : ""
- )
+ # case3 - if both include and exclude accounts are provided, includes override excludes
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
+ "MIXED"
+ ) : ""
)
)
)
@@ -161,10 +118,6 @@ locals {
# switch cases for various user provided accounts configuration to be onboarded
deployment_account_options = {
- NONE = {
- accounts_to_deploy = []
- account_filter_type = "NONE"
- }
UNION = {
accounts_to_deploy = var.include_accounts
account_filter_type = "UNION"
diff --git a/modules/config-posture/organizational.tf b/modules/config-posture/organizational.tf
index d13c82c..2bd8e1f 100644
--- a/modules/config-posture/organizational.tf
+++ b/modules/config-posture/organizational.tf
@@ -110,8 +110,8 @@ resource "aws_cloudformation_stack_set_instance" "stackset_instance" {
stack_set_name = aws_cloudformation_stack_set.stackset[0].name
deployment_targets {
organizational_unit_ids = [each.value]
- accounts = local.check_old_ouid_param ? null : (local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy)
- account_filter_type = local.check_old_ouid_param ? null : local.deployment_targets_accounts_filter
+ accounts = local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy
+ account_filter_type = local.deployment_targets_accounts_filter
}
operation_preferences {
max_concurrent_percentage = 100
diff --git a/modules/config-posture/variables.tf b/modules/config-posture/variables.tf
index 0870a24..0761c89 100644
--- a/modules/config-posture/variables.tf
+++ b/modules/config-posture/variables.tf
@@ -8,15 +8,6 @@ variable "is_organizational" {
description = "true/false whether secure-for-cloud should be deployed in an organizational setup (all accounts of org) or not (only on default aws provider account)"
}
-variable "org_units" {
- description = <<-EOF
- TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.
- When set, org units to install cspm.
- EOF
- type = set(string)
- default = []
-}
-
variable "region" {
type = string
default = ""
diff --git a/modules/integrations/cloud-logs/README.md b/modules/integrations/cloud-logs/README.md
index f7dc33c..7e529b5 100644
--- a/modules/integrations/cloud-logs/README.md
+++ b/modules/integrations/cloud-logs/README.md
@@ -114,7 +114,6 @@ No modules.
| [name](#input\_name) | (Optional) Name to be assigned to all child resources. A suffix may be added internally when required. | `string` | sysdig-secure-cloudlogs | no |
| [regions](#input\_regions) | (Optional) The list of AWS regions we want to scrape data from | `set(string)` | `[]` | no |
| [is\_gov\_cloud](#input\_is\_gov\_cloud\_onboarding) | true/false whether secure-for-cloud should be deployed in a govcloud account/org or not | `bool` | `false` | no |
-| [org\_units](#input\_org\_units) | (Optional) List of AWS Organizations organizational unit (OU) IDs in which to create the StackSet instances. Required for cross-account organizational deployments. | `list(string)` | `[]` | no |
| [timeout](#input\_timeout) | (Optional) The timeout for StackSet operations | `string` | `"30m"` | no |
## Outputs
diff --git a/modules/integrations/cross-account-event-bridge/README.md b/modules/integrations/cross-account-event-bridge/README.md
index 81e4204..eade58a 100644
--- a/modules/integrations/cross-account-event-bridge/README.md
+++ b/modules/integrations/cross-account-event-bridge/README.md
@@ -75,7 +75,6 @@ No modules.
| [is\_organizational](#input\_is\_organizational) | (Optional) Set this field to 'true' to deploy EventBridge to an AWS Organization (Or specific OUs) | `bool` | `false` | no |
| [mgt\_stackset](#input\_mgt\_stackset) | (Optional) Indicates if the management stackset should be deployed | `bool` | `true` | no |
| [name](#input\_name) | (Optional) Name to be assigned to all child resources. A suffix may be added internally when required. Use default value unless you need to install multiple instances | `string` | `"sysdig-secure-events"` | no |
-| [org\_units](#input\_org\_units) | TO BE DEPRECATED: Please work with Sysdig to migrate to using `include_ouids` instead.{
"product": "sysdig-secure-for-cloud"
} | no |
| [timeout](#input\_timeout) | Default timeout values for create, update, and delete operations | `string` | `"30m"` | no |
@@ -77,7 +76,6 @@ No modules.
|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| [sysdig\_secure\_account\_id](#output\_sysdig\_secure\_account\_id) | ID of the Sysdig Cloud Account created |
| [is\_organizational](#output\_is\_organizational) | Boolean value to indicate if secure-for-cloud is deployed to an entire AWS organization or not |
-| [organizational\_unit\_ids](#output\_organizational\_unit\_ids) | organizational unit ids onboarded |
| [is\_gov\_cloud\_onboarding](#output\_is\_gov\_cloud\_onboarding) | Boolean value to indicate if a govcloud account/organization is being onboarded |
| [include\_ouids](#output\_include\_ouids) | ouids to include for organization |
| [exclude\_ouids](#output\_exclude\_ouids) | ouids to exclude for organization |
diff --git a/modules/onboarding/locals.tf b/modules/onboarding/locals.tf
index 0cb7aac..75cd1d9 100644
--- a/modules/onboarding/locals.tf
+++ b/modules/onboarding/locals.tf
@@ -7,41 +7,11 @@ data "aws_organizations_organization" "org" {
}
locals {
- # check if both old and new org parameters are used, we fail early
- both_org_configuration_params = var.is_organizational && length(var.organizational_unit_ids) > 0 && (
- length(var.include_ouids) > 0 ||
- length(var.exclude_ouids) > 0 ||
- length(var.include_accounts) > 0 ||
- length(var.exclude_accounts) > 0
- )
-
- # check if old organizational_unit_ids parameter is provided, for backwards compatibility we will always give preference to it
- check_old_ouid_param = var.is_organizational && length(var.organizational_unit_ids) > 0
-
# fetch the AWS Root OU under org
# As per https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#organization-structure, there can be only one root
root_org_unit = var.is_organizational ? [for root in data.aws_organizations_organization.org[0].roots : root.id] : []
}
-check "validate_org_configuration_params" {
- assert {
- condition = length(var.organizational_unit_ids) == 0 # if this condition is false we throw warning
- error_message = <<-EOT
- WARNING: TO BE DEPRECATED 'organizational_unit_ids' on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs to use 'include_ouids' instead.
- EOT
- }
-
- assert {
- condition = !local.both_org_configuration_params # if this condition is false we throw error
- error_message = <<-EOT
- ERROR: If both organizational_unit_ids and include_ouids/exclude_ouids/include_accounts/exclude_accounts variables are populated,
- ONLY organizational_unit_ids will be considered. Please use only one of the two methods.
-
- Note: organizational_unit_ids is going to be DEPRECATED on 30th November, 2025. Please work with Sysdig to migrate your Terraform installs.
- EOT
- }
-}
-
# *****************************************************************************************************************************************************
# INCLUDE/EXCLUDE CONFIGURATION SUPPORT
#
@@ -67,27 +37,22 @@ check "validate_org_configuration_params" {
locals {
# OU CONFIGURATION (determine user provided org configuration)
org_configuration = (
- # case1 - if old method is used where ONLY organizational_unit_ids is provided, use those
- local.check_old_ouid_param ? (
- "old_ouid_param"
+ # case1 - if no include/exclude ous provided, include entire org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
+ "entire_org"
) : (
- # case2 - if no include/exclude ous provided, include entire org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) == 0 ? (
- "entire_org"
+ # case2 - if only included ouids provided, include those ous only
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
+ "included_ous_only"
) : (
- # case3 - if only included ouids provided, include those ous only
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) == 0 ? (
- "included_ous_only"
+ # case3 - if only excluded ouids provided, exclude their accounts from rest of org
+ var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
+ "excluded_ous_only"
) : (
- # case4 - if only excluded ouids provided, exclude their accounts from rest of org
- var.is_organizational && length(var.include_ouids) == 0 && length(var.exclude_ouids) > 0 ? (
- "excluded_ous_only"
- ) : (
- # case5 - if both include and exclude ouids are provided, includes override excludes
- var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
- "mixed_ous"
- ) : ""
- )
+ # case4 - if both include and exclude ouids are provided, includes override excludes
+ var.is_organizational && length(var.include_ouids) > 0 && length(var.exclude_ouids) > 0 ? (
+ "mixed_ous"
+ ) : ""
)
)
)
@@ -95,9 +60,6 @@ locals {
# switch cases for various user provided org configuration to be onboarded
deployment_options = {
- old_ouid_param = {
- org_units_to_deploy = var.organizational_unit_ids
- }
entire_org = {
org_units_to_deploy = local.root_org_unit
}
@@ -136,23 +98,18 @@ data "aws_organizations_organizational_unit_descendant_accounts" "ou_accounts_to
locals {
# ACCOUNTS CONFIGURATION (determine user provided accounts configuration)
accounts_configuration = (
- # case1 - if old method is used where ONLY organizational_unit_ids is provided, this configuration is a noop
- local.check_old_ouid_param ? (
- "NONE"
+ # case1 - if only included accounts provided, include those accts as well
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
+ "UNION"
) : (
- # case2 - if only included accounts provided, include those accts as well
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) == 0 ? (
- "UNION"
+ # case2 - if only excluded accounts or only excluded ouids provided, exclude those accounts
+ var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
+ "DIFFERENCE"
) : (
- # case3 - if only excluded accounts or only excluded ouids provided, exclude those accounts
- var.is_organizational && length(var.include_accounts) == 0 && (length(var.exclude_accounts) > 0 || local.org_configuration == "excluded_ous_only") ? (
- "DIFFERENCE"
- ) : (
- # case4 - if both include and exclude accounts are provided, includes override excludes
- var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
- "MIXED"
- ) : ""
- )
+ # case3 - if both include and exclude accounts are provided, includes override excludes
+ var.is_organizational && length(var.include_accounts) > 0 && length(var.exclude_accounts) > 0 ? (
+ "MIXED"
+ ) : ""
)
)
)
@@ -162,10 +119,6 @@ locals {
# switch cases for various user provided accounts configuration to be onboarded
deployment_account_options = {
- NONE = {
- accounts_to_deploy = []
- account_filter_type = "NONE"
- }
UNION = {
accounts_to_deploy = var.include_accounts
account_filter_type = "UNION"
diff --git a/modules/onboarding/organizational.tf b/modules/onboarding/organizational.tf
index c621318..cc741a2 100644
--- a/modules/onboarding/organizational.tf
+++ b/modules/onboarding/organizational.tf
@@ -60,8 +60,8 @@ resource "aws_cloudformation_stack_set_instance" "stackset_instance" {
stack_set_name = aws_cloudformation_stack_set.stackset[0].name
deployment_targets {
organizational_unit_ids = [each.value]
- accounts = local.check_old_ouid_param ? null : (local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy)
- account_filter_type = local.check_old_ouid_param ? null : local.deployment_targets_accounts_filter
+ accounts = local.deployment_targets_accounts_filter == "NONE" ? null : local.deployment_targets_accounts.accounts_to_deploy
+ account_filter_type = local.deployment_targets_accounts_filter
}
operation_preferences {
max_concurrent_percentage = 100
@@ -80,12 +80,11 @@ resource "aws_cloudformation_stack_set_instance" "stackset_instance" {
resource "sysdig_secure_organization" "aws_organization" {
count = var.is_organizational ? 1 : 0
management_account_id = sysdig_secure_cloud_auth_account.cloud_auth_account.id
- organizational_unit_ids = local.check_old_ouid_param ? var.organizational_unit_ids : []
organization_root_id = local.root_org_unit[0]
- included_organizational_groups = local.check_old_ouid_param ? [] : var.include_ouids
- excluded_organizational_groups = local.check_old_ouid_param ? [] : var.exclude_ouids
- included_cloud_accounts = local.check_old_ouid_param ? [] : var.include_accounts
- excluded_cloud_accounts = local.check_old_ouid_param ? [] : var.exclude_accounts
+ included_organizational_groups = var.include_ouids
+ excluded_organizational_groups = var.exclude_ouids
+ included_cloud_accounts = var.include_accounts
+ excluded_cloud_accounts = var.exclude_accounts
automatic_onboarding = var.enable_automatic_onboarding
lifecycle {
diff --git a/modules/onboarding/outputs.tf b/modules/onboarding/outputs.tf
index 0269a43..ba821cc 100644
--- a/modules/onboarding/outputs.tf
+++ b/modules/onboarding/outputs.tf
@@ -8,11 +8,6 @@ output "is_organizational" {
description = "onboard the organization in which account resides"
}
-output "organizational_unit_ids" {
- value = var.organizational_unit_ids
- description = "organizational unit ids to onboard"
-}
-
output "is_gov_cloud_onboarding" {
value = var.is_gov_cloud_onboarding
description = "onboard the govcloud account/organization"
diff --git a/modules/onboarding/variables.tf b/modules/onboarding/variables.tf
index 94a8696..f1daec4 100644
--- a/modules/onboarding/variables.tf
+++ b/modules/onboarding/variables.tf
@@ -47,16 +47,6 @@ variable "is_gov_cloud_onboarding" {
description = "true/false whether secure-for-cloud should be deployed in a govcloud account/org or not"
}
-variable "organizational_unit_ids" {
- description = <<-EOF
- TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.
- When set, restrict onboarding to a set of organizational unit identifiers whose child accounts and organizational units are to be onboarded.
- Default: onboard all organizational units.
- EOF
- type = set(string)
- default = []
-}
-
variable "include_ouids" {
description = "(Optional) ouids to include for organization"
type = set(string)
diff --git a/modules/vm-workload-scanning/README.md b/modules/vm-workload-scanning/README.md
index e4226c2..19ee9df 100644
--- a/modules/vm-workload-scanning/README.md
+++ b/modules/vm-workload-scanning/README.md
@@ -53,7 +53,6 @@ No modules.
|------|-------------|------|---------|:--------:|
| [tags](#input_tags) | sysdig secure-for-cloud tags. always include 'product' default tag for resource-group proper functioning | `map(string)` | {
"product": "sysdig-secure-for-cloud"
} | no |
| [is_organizational](#input_is_organizational) | Set this field to 'true' to deploy Agentless Workload Scanning to an AWS Organization (Or specific OUs) | `bool` | `false` | no |
-| [organizational_units_ids](#input_org_units) | TO BE DEPRECATED on 30th November, 2025: Please work with Sysdig to migrate to using `include_ouids` instead.