mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 05:01:55 +03:00
21 lines
478 B
Terraform
21 lines
478 B
Terraform
data "aws_ip_ranges" "european_ec2" {
|
|
regions = ["eu-west-1", "eu-central-1"]
|
|
services = ["ec2"]
|
|
}
|
|
|
|
resource "aws_security_group" "from_europe" {
|
|
name = "from_europe"
|
|
|
|
ingress {
|
|
from_port = "443"
|
|
to_port = "443"
|
|
protocol = "tcp"
|
|
cidr_blocks = slice(data.aws_ip_ranges.european_ec2.cidr_blocks, 0, 50)
|
|
}
|
|
tags = {
|
|
CreateDate = data.aws_ip_ranges.european_ec2.create_date
|
|
SyncToken = data.aws_ip_ranges.european_ec2.sync_token
|
|
}
|
|
}
|
|
|