-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecurity-groups.tf
40 lines (34 loc) · 1.19 KB
/
security-groups.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
40
resource "openstack_networking_secgroup_v2" "oauth" {
name = "${var.resource_prefix}-oauth-app"
description = "Managed by Terraform; OAuth test application"
}
resource "openstack_networking_secgroup_rule_v2" "v4-mysql" {
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 3306
port_range_max = 3306
remote_group_id = openstack_networking_secgroup_v2.oauth.id
description = "MySQL inbound from instances in this group"
security_group_id = openstack_networking_secgroup_v2.oauth.id
}
resource "openstack_networking_secgroup_rule_v2" "v4-http" {
direction = "ingress"
ethertype = "IPv4"
protocol = "tcp"
port_range_min = 80
port_range_max = 80
remote_ip_prefix = "0.0.0.0/0"
description = "HTTP inbound"
security_group_id = openstack_networking_secgroup_v2.oauth.id
}
resource "openstack_networking_secgroup_rule_v2" "v6-http" {
direction = "ingress"
ethertype = "IPv6"
protocol = "tcp"
port_range_min = 80
port_range_max = 80
remote_ip_prefix = "::/0"
description = "HTTP inbound"
security_group_id = openstack_networking_secgroup_v2.oauth.id
}