Skip to content

Commit

Permalink
SSPROD-28875: Fix region for CSPM Org TF module
Browse files Browse the repository at this point in the history
- Fix the CSPM org module to create stacksets in region TF variable only if provided,
  else make region field optional for aws_cloudformation_stack_set_instance.
- Remove "eu-central-1" as the default for region TF variable.
  • Loading branch information
ravinadhruve10 committed Aug 15, 2023
1 parent 6220000 commit 4ebf9e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/services/trust-relationship/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEMPLATE
resource "aws_cloudformation_stack_set_instance" "stackset_instance" {
count = var.is_organizational ? 1 : 0

region = var.region
region = var.region == "" ? null : var.region
stack_set_name = aws_cloudformation_stack_set.stackset[0].name
deployment_targets {
organizational_unit_ids = local.org_units_to_deploy
Expand Down
2 changes: 1 addition & 1 deletion modules/services/trust-relationship/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ variable "org_units" {

variable "region" {
type = string
default = "eu-central-1"
default = ""
description = "Default region for resource creation in organization mode"
}

Expand Down

0 comments on commit 4ebf9e4

Please sign in to comment.