From f058f6ca63efe5525eaf1dd0c31157d886c33f10 Mon Sep 17 00:00:00 2001 From: kobayashi-m42 Date: Fri, 9 Feb 2024 11:03:30 +0900 Subject: [PATCH] =?UTF-8?q?PlanetScale=E3=81=8B=E3=82=89RDS=E3=81=AB?= =?UTF-8?q?=E6=8E=A5=E7=B6=9A=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=82=BB=E3=82=AD=E3=83=A5=E3=83=AA=E3=83=86=E3=82=A3?= =?UTF-8?q?=E3=82=B0=E3=83=AB=E3=83=BC=E3=83=97=E3=83=AB=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/aws/rds/main.tf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/aws/rds/main.tf b/modules/aws/rds/main.tf index 63fda3a..3e76eb2 100644 --- a/modules/aws/rds/main.tf +++ b/modules/aws/rds/main.tf @@ -182,6 +182,22 @@ resource "aws_security_group_rule" "rds_from_migration" { source_security_group_id = var.migration_ecs_securitygroup_id } +resource "aws_security_group_rule" "rds_from_planetscale" { + security_group_id = aws_security_group.rds_cluster.id + type = "ingress" + from_port = "3306" + to_port = "3306" + protocol = "tcp" + cidr_blocks = [ + "3.209.149.66/32", + "3.215.97.46/32", + "34.193.111.15/32", + "3.115.153.48/32", + "35.75.255.19/32", + "52.68.124.171/32" + ] +} + resource "aws_security_group" "rds_cluster_stg" { name = "stg-${var.rds_name}-rds" description = "${var.rds_name}-rds Security Group for stg"