UPD: removed lookups
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
resource "aws_security_group" "sg" {
|
resource "aws_security_group" "sg" {
|
||||||
count = length(var.security-groups)
|
count = length(var.security-groups)
|
||||||
name = lookup(var.security-groups[count.index], "name")
|
name = var.security-groups[count.index].name
|
||||||
description = lookup(var.security-groups[count.index], "description")
|
description = var.security-groups[count.index].description
|
||||||
vpc_id = var.vpcid
|
vpc_id = var.vpcid
|
||||||
|
tags = {
|
||||||
|
Name = var.security-groups[count.index].name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// see https://www.terraform.io/docs/configuration/functions/flatten.html
|
// see https://www.terraform.io/docs/configuration/functions/flatten.html
|
||||||
|
|||||||
Reference in New Issue
Block a user