It is a best practice for AWS security groups to include a meaningful description attribute in their Terraform configuration, such as in the following example:
description = "Allow TLS inbound traffic"
Omitting the description field, as shown below, can lead to confusion and hinder effective management or auditing of security groups, especially in environments with many resources:
Without clear descriptions, security teams may struggle to quickly identify the purpose of a group, increasing the risk of misconfigurations and delayed incident response.
Compliant Code Examples
resource"aws_security_group""allow_tls"{name="allow_tls"description="Allow TLS inbound traffic"vpc_id=aws_vpc.main.idingress{description="TLS from VPC"from_port=443to_port=443protocol="tcp"cidr_blocks=[aws_vpc.main.cidr_block]ipv6_cidr_blocks=[aws_vpc.main.ipv6_cidr_block]}tags={Name="allow_tls"}}
Non-Compliant Code Examples
resource"aws_security_group""allow_tls"{name="allow_tls"vpc_id=aws_vpc.main.idingress{description="TLS from VPC"from_port=443to_port=443protocol="tcp"cidr_blocks=[aws_vpc.main.cidr_block]ipv6_cidr_blocks=[aws_vpc.main.ipv6_cidr_block]}tags={Name="allow_tls"}}
1
2
rulesets:- Terraform / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.