resource "aws_flow_log" "flow_log_alpha_vpc_log" { log_group_name = "${aws_cloudwatch_log_group.flow_log_alpha_log_group.name}" iam_role_arn = "${aws_iam_role.flow_log_alpha_role.arn}" vpc_id = "${data.aws_vpc.default.id}" traffic_type = "ALL" } resource "aws_subnet" "flow_log_alpha_subnet" { vpc_id = "${data.aws_vpc.default.id}" cidr_block = "172.31.112.0/24" } resource "aws_flow_log" "flow_log_alpha_subnet_log" { log_group_name = "${aws_cloudwatch_log_group.flow_log_alpha_log_group.name}" iam_role_arn = "${aws_iam_role.flow_log_alpha_role.arn}" subnet_id = "${aws_subnet.flow_log_alpha_subnet.id}" traffic_type = "ALL" } resource "aws_cloudwatch_log_group" "flow_log_alpha_log_group" { name = "flow_log_alpha_log_group" } resource "aws_iam_role" "flow_log_alpha_role" { name = "flow_log_alpha_role" assume_role_policy = <