Monitoring - SG 변경

This commit is contained in:
dsk-minchulahn
2023-12-19 11:52:32 +09:00
parent a868ce0ebc
commit 947561ce1d
3 changed files with 47 additions and 70 deletions

View File

@@ -5,26 +5,26 @@ resource "aws_security_group" "grafana-allow-security" {
ingress { ingress {
description = "Allow SSH traffic" description = "Allow SSH traffic"
from_port = 22 from_port = 2222
to_port = 22 to_port = 2222
protocol = "tcp" protocol = "tcp"
cidr_blocks = ["118.223.123.161/32"] cidr_blocks = ["39.115.183.236/32"]
} }
ingress { # ingress {
description = "Allow HTTP traffic" # description = "Allow HTTP traffic"
from_port = 80 # from_port = 80
to_port = 80 # to_port = 80
protocol = "tcp" # protocol = "tcp"
cidr_blocks = ["118.223.123.161/32"] # cidr_blocks = ["118.223.123.161/32"]
} # }
ingress { ingress {
description = "Allow TLS traffic" description = "Allow HTTPS traffic"
from_port = 443 from_port = 443
to_port = 443 to_port = 443
protocol = "tcp" protocol = "tcp"
cidr_blocks = ["118.223.123.161/32", "39.115.183.138/32"] cidr_blocks = ["118.223.123.161/32", "39.115.183.138/32", "39.115.183.236/32"]
} }
# ingress { # ingress {

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.5.7", "terraform_version": "1.5.7",
"serial": 18, "serial": 22,
"lineage": "816258a5-69eb-6967-f105-8709f7e2588d", "lineage": "816258a5-69eb-6967-f105-8709f7e2588d",
"outputs": {}, "outputs": {},
"resources": [ "resources": [
@@ -174,9 +174,10 @@
{ {
"cidr_blocks": [ "cidr_blocks": [
"118.223.123.161/32", "118.223.123.161/32",
"39.115.183.138/32" "39.115.183.138/32",
"39.115.183.236/32"
], ],
"description": "Allow TLS traffic", "description": "Allow HTTPS traffic",
"from_port": 443, "from_port": 443,
"ipv6_cidr_blocks": [], "ipv6_cidr_blocks": [],
"prefix_list_ids": [], "prefix_list_ids": [],
@@ -185,32 +186,6 @@
"self": false, "self": false,
"to_port": 443 "to_port": 443
}, },
{
"cidr_blocks": [
"118.223.123.161/32"
],
"description": "Allow HTTP traffic",
"from_port": 80,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 80
},
{
"cidr_blocks": [
"118.223.123.161/32"
],
"description": "Allow SSH traffic",
"from_port": 22,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 22
},
{ {
"cidr_blocks": [ "cidr_blocks": [
"172.31.0.0/16" "172.31.0.0/16"
@@ -224,6 +199,19 @@
"self": false, "self": false,
"to_port": 0 "to_port": 0
}, },
{
"cidr_blocks": [
"39.115.183.236/32"
],
"description": "Allow SSH traffic",
"from_port": 2222,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 2222
},
{ {
"cidr_blocks": [], "cidr_blocks": [],
"description": "nlb-securitygroup", "description": "nlb-securitygroup",

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.5.7", "terraform_version": "1.5.7",
"serial": 16, "serial": 20,
"lineage": "816258a5-69eb-6967-f105-8709f7e2588d", "lineage": "816258a5-69eb-6967-f105-8709f7e2588d",
"outputs": {}, "outputs": {},
"resources": [ "resources": [
@@ -173,35 +173,11 @@
"ingress": [ "ingress": [
{ {
"cidr_blocks": [ "cidr_blocks": [
"118.223.123.161/32" "118.223.123.161/32",
"39.115.183.138/32",
"39.115.183.236/32"
], ],
"description": "Allow HTTP traffic", "description": "Allow HTTPS traffic",
"from_port": 80,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 80
},
{
"cidr_blocks": [
"118.223.123.161/32"
],
"description": "Allow SSH traffic",
"from_port": 22,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 22
},
{
"cidr_blocks": [
"118.223.123.161/32"
],
"description": "Allow TLS traffic",
"from_port": 443, "from_port": 443,
"ipv6_cidr_blocks": [], "ipv6_cidr_blocks": [],
"prefix_list_ids": [], "prefix_list_ids": [],
@@ -223,6 +199,19 @@
"self": false, "self": false,
"to_port": 0 "to_port": 0
}, },
{
"cidr_blocks": [
"39.115.183.236/32"
],
"description": "Allow SSH traffic",
"from_port": 22,
"ipv6_cidr_blocks": [],
"prefix_list_ids": [],
"protocol": "tcp",
"security_groups": [],
"self": false,
"to_port": 22
},
{ {
"cidr_blocks": [], "cidr_blocks": [],
"description": "nlb-securitygroup", "description": "nlb-securitygroup",