Problem Terraform Error: aws_db_security_group.fw_xxxx

It’s my problem

Error: aws_db_security_group.fw_XXXXXX: ingress.0: invalid or unknown key: cidr_blocks
Error: aws_db_security_group.fw_XXXXXX: ingress.0: invalid or unknown key: from_port
Error: aws_db_security_group.fw_XXXXXX: ingress.0: invalid or unknown key: protocol
Error: aws_db_security_group.fw_XXXXXX: ingress.0: invalid or unknown key: to_port

Thank’s for your help

You should be a little more eloborative on your environment, maybe share your source code, …

Sorry, here is my code terraform

resource “aws_db_security_group” “fw_test” {
name = “fw_coverity”
tags {
Universe = “{var.universe}" Zone = "{var.zone}”
Kind = “fw”
Name = “FW test”
}

ingress {
description = “Allow Postgresql ingress traffic from …”
from_port = 54329
to_port = 54329
protocol = “tcp”
cidr_blocks = [“xxx.xxx.xxx.0/24”]
}
}

With variable

data “aws_db_security_group” “fw_test” {
name = “fw_test”
vpc_id = “${data.aws_vpc.default_vpc.id}”
}

I’m an version terraform v0.11.14

Then the question is a) could you kindly format your code using tripple backticks and b) maybe your environment requires “aws_security_group_rule” for rule definitions instead of inline rules.