forked from ExpediaGroup/apiary-federation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsg.tf
39 lines (34 loc) · 752 Bytes
/
sg.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Copyright (C) 2018-2019 Expedia Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
resource "aws_security_group" "wd_sg" {
name = local.instance_alias
vpc_id = var.vpc_id
tags = var.tags
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = var.ingress_cidr
}
ingress {
from_port = 48869
to_port = 48869
protocol = "tcp"
cidr_blocks = var.ingress_cidr
}
ingress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = data.aws_vpc.waggledance_vpc.cidr_block_associations.*.cidr_block
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
}