AWS Security Hub Standards Subscription
This page shows how to write Terraform for Security Hub Standards Subscription and write them securely.
aws_securityhub_standards_subscription (Terraform)
The Standards Subscription in Security Hub can be configured in Terraform with the resource name aws_securityhub_standards_subscription
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
main.tf#L3
resource "aws_securityhub_standards_subscription" "aws_best_practices" {
standards_arn = "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0"
depends_on = [aws_securityhub_account.default]
}
resource "aws_securityhub_standards_subscription" "cis" {
security_hub.tf#L3
resource "aws_securityhub_standards_subscription" "aws_best_practices" {
standards_arn = "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0"
depends_on = [aws_securityhub_account.default]
}
resource "aws_securityhub_standards_subscription" "cis" {
Parameters
-
id
optional computed - string -
standards_arn
required - string
Explanation in Terraform Registry
Subscribes to a Security Hub standard.
CloudFormation Example
CloudFormation code does not have the related resource.
Frequently asked questions
What is AWS Security Hub Standards Subscription?
AWS Security Hub Standards Subscription is a resource for Security Hub of Amazon Web Service. Settings can be wrote in Terraform.
Where can I find the example code for the AWS Security Hub Standards Subscription?
For Terraform, the mamiotsu/cloud-bankruptcy-iac and K-taiga/aws_security source code examples are useful. See the Terraform Example section for further details.