I'm trying to set individual names against each entry in my security group.
My example code that doesn't work below, I'd expect this to yield the result in the picture but the Name tag remains blank (i set this one as an example in the picture through the console). This tag works other places like the "Allow-Google" name tag against the security group. Is there a way I can achieve this ?
resource "aws_security_group" "allow-google-dns" {
name = "allow-google-dns"
description = "Allows google dns"
vpc_id = var.vpcid
ingress = [
{
description = "allows google in"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["8.8.8.8/32" ]
ipv6_cidr_blocks = []
prefix_list_ids = []
security_groups = []
self = false
tags = {
Name = "MyName"
}
}
]
tags = {
Name = "Allow-Google"
}
}