AWS Amazon Inspector Resource Group
This page shows how to write Terraform and CloudFormation for Amazon Inspector Resource Group and write them securely.
aws_inspector_resource_group (Terraform)
The Resource Group in Amazon Inspector can be configured in Terraform with the resource name aws_inspector_resource_group
. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_inspector_resource_group" "inspector_resource_group" {
tags = {
Name = "Name"
Env = "inspector_group"
}
}
resource "aws_inspector_resource_group" "scheduled_inspector" {
tags {
Inspector = "True"
Terraformed = "true"
}
}
resource "aws_inspector_resource_group" "this" {
tags = {
Name = "continuous-assessment-instance"
Env = "True"
}
}
Parameters
-
arn
optional computed - string -
id
optional computed - string -
tags
required - map from string to string
Explanation in Terraform Registry
Provides an Amazon Inspector resource group resource.
AWS::Inspector::ResourceGroup (CloudFormation)
The ResourceGroup in Inspector can be configured in CloudFormation with the resource name AWS::Inspector::ResourceGroup
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: "AWS::Inspector::ResourceGroup"
Properties:
ResourceGroupTags:
- Key: "ResourceGroup"
Value: "Nginx"
Type: AWS::Inspector::ResourceGroup
Properties:
ResourceGroupTags:
- Key: !Ref ResourceGroupTagKey
Value: !Ref ResourceGroupTagValue
Type: AWS::Inspector::ResourceGroup
Properties:
ResourceGroupTags:
- Key: !Ref ResourceGroupTagKey
Value: !Ref ResourceGroupTagValue
Type: AWS::Inspector::ResourceGroup
Properties:
ResourceGroupTags:
-
Key: !Ref EC2Tag1Key
Value: !Ref EC2Tag1Value
Type: AWS::Inspector::ResourceGroup
Properties:
ResourceGroupTags:
- Key: !Ref ResourceGroupTagKey
Value: !Ref ResourceGroupTagValue
"AWS::Inspector::ResourceGroup": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-resourcegroup.html",
"Attributes": {
"Arn": {
"PrimitiveType": "String"
}
"AWS::Inspector::ResourceGroup": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-resourcegroup.html",
"Attributes": {
"Arn": {
"PrimitiveType": "String"
}
"AWS::Inspector::ResourceGroup": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-resourcegroup.html",
"Attributes": {
"Arn": {
"PrimitiveType": "String"
}
"AWS::Inspector::ResourceGroup": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-resourcegroup.html",
"Attributes": {
"Arn": {
"PrimitiveType": "String"
}
"AWS::Inspector::ResourceGroup": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspector-resourcegroup.html",
"Attributes": {
"Arn": {
"PrimitiveType": "String"
}
Parameters
-
ResourceGroupTags
required - List of Tag
Explanation in CloudFormation Registry
The
AWS::Inspector::ResourceGroup
resource is used to create Amazon Inspector resource groups. A resource group defines a set of tags that, when queried, identify the AWS resources that make up the assessment target.
Frequently asked questions
What is AWS Amazon Inspector Resource Group?
AWS Amazon Inspector Resource Group is a resource for Amazon Inspector of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Amazon Inspector Resource Group?
For Terraform, the Prashant-jumpbyte/terraform-aws-inspector-setup, heldersepu/hs-scripts and sridhartw/golden_ami_scanning source code examples are useful. See the Terraform Example section for further details.
For CloudFormation, the aws-samples/deploy-cis-level-1-hardened-ami-with-ec2-image-builder-pipeline, ambasad/devio-blog-cfn and ambasad/devio-blog-cfn source code examples are useful. See the CloudFormation Example section for further details.