Ensure VPC Flow Logs Enabled

Provides a VPC Flow Log resource. Every VPC resource should have an associated Flow Log

Risk Level: informational
Platform: Alicloud
Spectral Rule ID: TFALCLD040

REMEDIATION

resource is not associated with an alicloud_vpc_flow_log

resource "alicloud_vpc" "main" {
  cidr_block = "192.168.0.0/24"
  name       = var.name
}
resource "alicloud_vpc_flow_log" "default" {
- depends_on     = ["alicloud_vpc.default"]
+ depends_on     = ["alicloud_vpc.main"]
- resource_id    = alicloud_vpc.default.id
+ resource_id    = alicloud_vpc.main.id
}

Read more: