diff --git a/emr/README.md b/emr/README.md
index aea2ed1..f0ef9cd 100644
--- a/emr/README.md
+++ b/emr/README.md
@@ -39,8 +39,8 @@ Postgres. This will fail if the prefix list does not exist.
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 0.13 |
-| [aws](#requirement\_aws) | >= 3.66.0 |
+| [terraform](#requirement\_terraform) | >= 1.0.0 |
+| [aws](#requirement\_aws) | >= 5.0 |
## Providers
diff --git a/emr/main.tf b/emr/main.tf
index b3e5068..0ba8949 100644
--- a/emr/main.tf
+++ b/emr/main.tf
@@ -128,7 +128,7 @@ resource "aws_vpc_security_group_egress_rule" "all" {
to_port = 0
ip_protocol = -1
# cidr_block = local.egress_networks
- cidr_block = local.n_all
+ cidr_ipv4 = local.n_all[0]
}
@@ -158,13 +158,13 @@ resource "aws_vpc_security_group_ingress_rule" "security_group" {
# ingress: by cidr_block
resource "aws_vpc_security_group_ingress_rule" "cidr_block" {
- for_each = { for x in local.sg_cb : x.cidr_label => x }
+ for_each = { for x in local.sg_cidr : x.cidr_label => x }
security_group_id = aws_security_group.sg[each.value.key].id
- description = x.description
- from_port = x.from
- to_port = x.to
- ip_protocol = x.protocol
- cidr_block = x.cidr_block
+ description = each.value.description
+ from_port = each.value.from
+ to_port = each.value.to
+ ip_protocol = each.value.protocol
+ cidr_ipv4 = each.value.cidr_block
}