Skip to content

Commit

Permalink
Update variables.tf (#146)
Browse files Browse the repository at this point in the history
* Update variables.tf

* Update main.tf
  • Loading branch information
danielpalmeribm authored Jul 15, 2024
1 parent 5f8a4b5 commit bc8ab80
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
20 changes: 19 additions & 1 deletion modules/aws/ai_opt_out/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,25 @@ resource "aws_organizations_policy" "ai_services_opt_out" {
name = var.policy_name
description = var.policy_description
type = "AISERVICES_OPT_OUT_POLICY"
content = var.services_overrides
content = jsonencode({
services = {
"@@operators_allowed_for_child_policies" = [
"@@none"
]
default = {
"@@operators_allowed_for_child_policies" = [
"@@none"
]
opt_out_policy = {
"@@assign" = "optOut"
"@@operators_allowed_for_child_policies" = [
"@@none"
]
}
}
}
}
)
}


Expand Down
15 changes: 1 addition & 14 deletions modules/aws/ai_opt_out/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,5 @@ variable "apply_to_ous_or_accounts" {
default = []
}

variable "services_overrides" {
{
"services": {
"@@operators_allowed_for_child_policies": ["@@none"],
"default": {
"@@operators_allowed_for_child_policies": ["@@none"],
"opt_out_policy": {
"@@operators_allowed_for_child_policies": ["@@none"],
"@@assign": "optOut"
}
}
}
}
}


0 comments on commit bc8ab80

Please sign in to comment.