-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors cross-account member for modern terraform syntax
- Loading branch information
1 parent
f4b8441
commit 386a2bc
Showing
13 changed files
with
98 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
output "account" { | ||
description = "Object containing the SecurityHub account resource" | ||
value = module.account.account | ||
description = "Object containing the SecurityHub resources" | ||
value = module.account | ||
} | ||
|
||
output "member" { | ||
description = "Object containing the SecurityHub member resource" | ||
value = module.member.member | ||
value = aws_securityhub_member.this | ||
} | ||
|
||
output "accepter" { | ||
description = "Object containing the SecurityHub accepter resource" | ||
value = module.accept.accepter | ||
} | ||
|
||
output "subscriptions" { | ||
description = "Object containing the SecurityHub subscriptions resources" | ||
value = module.account.subscriptions | ||
} | ||
|
||
output "action_targets" { | ||
description = "Object containing the SecurityHub action targets resources" | ||
value = module.account.action_targets | ||
value = aws_securityhub_invite_accepter.this | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,29 @@ | ||
variable "member_email" { | ||
description = "Email address associated with the member account. Required for the cross-account SecurityHub member invite workflow" | ||
type = string | ||
} | ||
|
||
variable "action_targets" { | ||
description = "Schema list of SecurityHub action targets." | ||
type = list(object({ | ||
name = string | ||
description = string | ||
identifer = string | ||
})) | ||
default = [] | ||
} | ||
|
||
variable "auto_enable_controls" { | ||
description = "Boolean that enables the security standards that Security Hub has designated as automatically enabled including: `AWS Foundational Security Best Practices v1.0.0` and `CIS AWS Foundations Benchmark v1.2.0`" | ||
type = bool | ||
default = true | ||
} | ||
variable "security_hub" { | ||
description = "Object of inputs for Security Hub configuration" | ||
nullable = false | ||
type = object({ | ||
member_email = string | ||
master_id = optional(string) | ||
|
||
variable "control_finding_generator" { | ||
description = "Manages whether the account reports consolidated control findings, or generates separate findings for every enabled standard." | ||
type = string | ||
default = "SECURITY_CONTROL" | ||
} | ||
auto_enable_controls = optional(bool, true) | ||
control_finding_generator = optional(string) | ||
enable_default_standards = optional(bool, true) | ||
|
||
variable "enable_default_standards" { | ||
description = "Boolean that automatically enables new controls when they are added to standards that are enabled" | ||
type = bool | ||
default = true | ||
} | ||
product_subscription_arns = optional(list(string), []) | ||
standard_subscription_arns = optional(list(string), []) | ||
|
||
variable "product_subscription_arns" { | ||
description = "List of product arns to subscribe to. See https://www.terraform.io/docs/providers/aws/r/securityhub_product_subscription.html" | ||
type = list(string) | ||
default = [] | ||
} | ||
|
||
variable "standard_subscription_arns" { | ||
description = "List of standard arns to subscribe to. See https://www.terraform.io/docs/providers/aws/r/securityhub_standards_subscription.html" | ||
type = list(string) | ||
default = [] | ||
} | ||
action_targets = optional(list(object({ | ||
name = string | ||
description = string | ||
identifier = string | ||
})), []) | ||
|
||
variable "standards_controls" { | ||
description = "List of Security Hub standards to enable or disable in current region." | ||
type = list(object({ | ||
name = string | ||
standards_control_arn = string | ||
control_status = string | ||
disabled_reason = string | ||
})) | ||
default = [] | ||
standards_control_associations = optional(list(object({ | ||
name = string | ||
association_status = string | ||
security_control_id = string | ||
standards_arn = string | ||
updated_reason = optional(string) | ||
})), []) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters