Skip to content

Commit 0540cca

Browse files
committed
feat(account): add close_on_deletion parameter to aws_organizations_account
1 parent eba0f86 commit 0540cca

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

modules/account/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ resource "aws_organizations_account" "member_account" {
44
parent_id = var.parent_id
55
iam_user_access_to_billing = var.iam_user_access_to_billing
66
tags = var.tags
7+
close_on_deletion = var.close_on_deletion
78
}

modules/account/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ variable "iam_user_access_to_billing" {
2525
}
2626
}
2727

28+
variable "close_on_deletion" {
29+
description = "(Optional) If true, a deletion event will close the account. Otherwise, it will only remove from the organization."
30+
type = bool
31+
default = true
32+
33+
validation {
34+
condition = contains([true, false], var.close_on_deletion)
35+
error_message = "Allowed values for close_on_deletion: true or false"
36+
}
37+
}
38+
2839
variable "tags" {
2940
description = "(Optional) Key-value map of resource tags."
3041
type = map(string)

0 commit comments

Comments
 (0)