Skip to content

Conversation

@catturtle123
Copy link
Contributor

Summary

  • Route53 A λ ˆμ½”λ“œ Terraform μΆ”κ°€ (api.moaofficial.kr β†’ EC2 Elastic IP)
  • EC2 user_data에 Nginx + Certbot(snap) μžλ™ μ„€μΉ˜
  • SSL μΈμ¦μ„œλŠ” DNS μ „νŒŒ ν›„ μˆ˜λ™ λ°œκΈ‰ (sudo certbot --nginx)

Changes

파일 λ³€κ²½ λ‚΄μš©
ci/terraform/route53.tf Route53 A λ ˆμ½”λ“œ λ¦¬μ†ŒμŠ€ μΆ”κ°€
ci/terraform/ec2.tf Nginx, Certbot μ„€μΉ˜ 및 λ¦¬λ²„μŠ€ ν”„λ‘μ‹œ μ„€μ •
ci/terraform/variables.tf domain_name, api_subdomain, ssl_email λ³€μˆ˜ μΆ”κ°€
ci/terraform/outputs.tf api_domain, ssl_setup_command 좜λ ₯ μΆ”κ°€
ci/nginx/api.conf Nginx μ„€μ • ν…œν”Œλ¦Ώ (참고용)
ci/scripts/setup-ssl.sh SSL μˆ˜λ™ λ°œκΈ‰ 슀크립트

After Merge

  1. CIμ—μ„œ terraform apply μžλ™ μ‹€ν–‰
  2. Route53 A λ ˆμ½”λ“œ 생성됨
  3. EC2 접속 ν›„ SSL λ°œκΈ‰:
    sudo certbot --nginx -d api.moaofficial.kr

Note

⚠️ μ½˜μ†”μ—μ„œ 이미 api.moaofficial.kr A λ ˆμ½”λ“œλ₯Ό λ§Œλ“€μ—ˆλ‹€λ©΄, λ¨Έμ§€ 전에 μ‚­μ œ ν•„μš” (좩돌 λ°©μ§€)

Closes #69

πŸ€– Generated with Claude Code

- Route53 A λ ˆμ½”λ“œ μΆ”κ°€ (api.moaofficial.kr -> EC2 EIP)
- EC2 user_data에 Nginx + Certbot(snap) μ„€μΉ˜ μΆ”κ°€
- Nginx λ¦¬λ²„μŠ€ ν”„λ‘μ‹œ μ„€μ • (localhost:8080)
- SSL μΈμ¦μ„œ μˆ˜λ™ λ°œκΈ‰ 슀크립트 μΆ”κ°€
- domain_name, api_subdomain, ssl_email λ³€μˆ˜ μΆ”κ°€

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Important

Review skipped

Review was skipped due to path filters

β›” Files ignored due to path filters (8)
  • ci/nginx/api.conf is excluded by none and included by none
  • ci/scripts/setup-ssl.sh is excluded by none and included by none
  • ci/terraform/README.md is excluded by none and included by none
  • ci/terraform/ec2.tf is excluded by none and included by none
  • ci/terraform/outputs.tf is excluded by none and included by none
  • ci/terraform/route53.tf is excluded by none and included by none
  • ci/terraform/terraform.tfvars.example is excluded by none and included by none
  • ci/terraform/variables.tf is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • πŸ” Trigger a full review
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/69-infra-sync-https

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Terraform Format πŸ–Œ failure

Terraform Init βš™οΈ success

Terraform Validate πŸ€– success

Terraform Plan πŸ“– failure

Show Plan
Acquiring state lock. This may take a few moments...
data.aws_route53_zone.main: Reading...
aws_vpc.main: Refreshing state... [id=vpc-06e337fe8c72d274b]
data.aws_ami.ubuntu_2404: Reading...
aws_s3_bucket.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_db_parameter_group.main: Refreshing state... [id=web-team-3-dev-mysql8-params]
aws_dynamodb_table.terraform_lock: Refreshing state... [id=web-team-3-tf-lock-v2]
data.aws_ami.ubuntu_2404: Read complete after 1s [id=ami-0130d8d35bcd2d433]
aws_route_table.private: Refreshing state... [id=rtb-0355eb582b4ff3dd2]
aws_subnet.private[1]: Refreshing state... [id=subnet-02884b8d343ff25a5]
aws_subnet.public[0]: Refreshing state... [id=subnet-0efa7ca9b8d1e451d]
aws_subnet.public[1]: Refreshing state... [id=subnet-07e38fbb8cfadc882]
aws_subnet.private[0]: Refreshing state... [id=subnet-007a290b1fdb51067]
aws_internet_gateway.main: Refreshing state... [id=igw-0e141727ecff126ee]
aws_security_group.ec2: Refreshing state... [id=sg-0b5c350188ea252e5]
aws_s3_bucket_public_access_block.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_versioning.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_server_side_encryption_configuration.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_route_table.public: Refreshing state... [id=rtb-0dad63dad02ddc5ff]
aws_security_group.rds: Refreshing state... [id=sg-03705313b48995086]
aws_route_table_association.private[1]: Refreshing state... [id=rtbassoc-0d27850a8a6e94ba5]
aws_route_table_association.private[0]: Refreshing state... [id=rtbassoc-06218dad0b08de21c]
aws_db_subnet_group.main: Refreshing state... [id=web-team-3-dev-db-subnet-group]
aws_instance.app: Refreshing state... [id=i-09f54da883306a39e]
aws_route_table_association.public[0]: Refreshing state... [id=rtbassoc-099953f254a4d5809]
aws_route_table_association.public[1]: Refreshing state... [id=rtbassoc-03c01253dea21ea7b]
aws_db_instance.main: Refreshing state... [id=db-CDWN44WOQ6PTQFDBPY6KNBS2ME]
aws_eip.app: Refreshing state... [id=eipalloc-0b8749a716be29355]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform planned the following actions, but then encountered a problem:

  # aws_instance.app will be updated in-place
  ~ resource "aws_instance" "app" {
        id                                   = "i-09f54da883306a39e"
      ~ public_dns                           = "ec2-43-203-94-76.ap-northeast-2.compute.amazonaws.com" -> (known after apply)
      ~ public_ip                            = "43.203.94.76" -> (known after apply)
        tags                                 = {
            "Name" = "web-team-3-dev-app-server"
        }
      ~ user_data                            = "0a0720645d553bc20bab560678b53f2415a60f79" -> "8cc2ec74aecfceb91ba6baba93d8ce2764500220"
        # (30 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Changes to Outputs:
  + api_domain                 = "https://api.moaofficial.kr"
  + api_domain_name            = "api.moaofficial.kr"
  + ssl_setup_command          = "sudo certbot --nginx -d api.moaofficial.kr"

Pushed by: @catturtle123, Action: pull_request

- t3.micro λ©”λͺ¨λ¦¬ λΆ€μ‘± λŒ€λΉ„ 2GB swap μ„€μ •
- λΆ€νŒ… μ‹œ μžλ™ 마운트 (/etc/fstab)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions
Copy link

Terraform Format πŸ–Œ failure

Terraform Init βš™οΈ success

Terraform Validate πŸ€– success

Terraform Plan πŸ“– failure

Show Plan
Acquiring state lock. This may take a few moments...
data.aws_ami.ubuntu_2404: Reading...
data.aws_route53_zone.main: Reading...
aws_db_parameter_group.main: Refreshing state... [id=web-team-3-dev-mysql8-params]
aws_dynamodb_table.terraform_lock: Refreshing state... [id=web-team-3-tf-lock-v2]
aws_s3_bucket.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_vpc.main: Refreshing state... [id=vpc-06e337fe8c72d274b]
data.aws_ami.ubuntu_2404: Read complete after 1s [id=ami-0130d8d35bcd2d433]
aws_internet_gateway.main: Refreshing state... [id=igw-0e141727ecff126ee]
aws_subnet.public[0]: Refreshing state... [id=subnet-0efa7ca9b8d1e451d]
aws_subnet.private[1]: Refreshing state... [id=subnet-02884b8d343ff25a5]
aws_subnet.public[1]: Refreshing state... [id=subnet-07e38fbb8cfadc882]
aws_route_table.private: Refreshing state... [id=rtb-0355eb582b4ff3dd2]
aws_subnet.private[0]: Refreshing state... [id=subnet-007a290b1fdb51067]
aws_security_group.ec2: Refreshing state... [id=sg-0b5c350188ea252e5]
aws_route_table.public: Refreshing state... [id=rtb-0dad63dad02ddc5ff]
aws_db_subnet_group.main: Refreshing state... [id=web-team-3-dev-db-subnet-group]
aws_route_table_association.private[1]: Refreshing state... [id=rtbassoc-0d27850a8a6e94ba5]
aws_route_table_association.private[0]: Refreshing state... [id=rtbassoc-06218dad0b08de21c]
aws_route_table_association.public[0]: Refreshing state... [id=rtbassoc-099953f254a4d5809]
aws_route_table_association.public[1]: Refreshing state... [id=rtbassoc-03c01253dea21ea7b]
aws_security_group.rds: Refreshing state... [id=sg-03705313b48995086]
aws_instance.app: Refreshing state... [id=i-09f54da883306a39e]
aws_s3_bucket_server_side_encryption_configuration.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_versioning.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_public_access_block.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_db_instance.main: Refreshing state... [id=db-CDWN44WOQ6PTQFDBPY6KNBS2ME]
aws_eip.app: Refreshing state... [id=eipalloc-0b8749a716be29355]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform planned the following actions, but then encountered a problem:

  # aws_instance.app will be updated in-place
  ~ resource "aws_instance" "app" {
        id                                   = "i-09f54da883306a39e"
      ~ public_dns                           = "ec2-43-203-94-76.ap-northeast-2.compute.amazonaws.com" -> (known after apply)
      ~ public_ip                            = "43.203.94.76" -> (known after apply)
        tags                                 = {
            "Name" = "web-team-3-dev-app-server"
        }
      ~ user_data                            = "0a0720645d553bc20bab560678b53f2415a60f79" -> "d44f83f405fc7f74822a309cb366f5ce55ff77a2"
        # (30 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Changes to Outputs:
  + api_domain                 = "https://api.moaofficial.kr"
  + api_domain_name            = "api.moaofficial.kr"
  + ssl_setup_command          = "sudo certbot --nginx -d api.moaofficial.kr"

Pushed by: @catturtle123, Action: pull_request

@catturtle123 catturtle123 self-assigned this Jan 31, 2026
@github-actions
Copy link

Terraform Format πŸ–Œ failure

Terraform Init βš™οΈ success

Terraform Validate πŸ€– success

Terraform Plan πŸ“– success

Show Plan
Acquiring state lock. This may take a few moments...
data.aws_route53_zone.main: Reading...
data.aws_ami.ubuntu_2404: Reading...
aws_vpc.main: Refreshing state... [id=vpc-06e337fe8c72d274b]
aws_dynamodb_table.terraform_lock: Refreshing state... [id=web-team-3-tf-lock-v2]
aws_db_parameter_group.main: Refreshing state... [id=web-team-3-dev-mysql8-params]
aws_s3_bucket.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
data.aws_route53_zone.main: Read complete after 1s [id=Z093699513LDAGIAMRGKU]
data.aws_ami.ubuntu_2404: Read complete after 1s [id=ami-0130d8d35bcd2d433]
aws_route_table.private: Refreshing state... [id=rtb-0355eb582b4ff3dd2]
aws_subnet.private[1]: Refreshing state... [id=subnet-02884b8d343ff25a5]
aws_subnet.public[0]: Refreshing state... [id=subnet-0efa7ca9b8d1e451d]
aws_subnet.public[1]: Refreshing state... [id=subnet-07e38fbb8cfadc882]
aws_subnet.private[0]: Refreshing state... [id=subnet-007a290b1fdb51067]
aws_internet_gateway.main: Refreshing state... [id=igw-0e141727ecff126ee]
aws_security_group.ec2: Refreshing state... [id=sg-0b5c350188ea252e5]
aws_s3_bucket_versioning.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_server_side_encryption_configuration.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_s3_bucket_public_access_block.terraform_state: Refreshing state... [id=web-team-3-tf-state-v2]
aws_route_table.public: Refreshing state... [id=rtb-0dad63dad02ddc5ff]
aws_security_group.rds: Refreshing state... [id=sg-03705313b48995086]
aws_route_table_association.private[0]: Refreshing state... [id=rtbassoc-06218dad0b08de21c]
aws_db_subnet_group.main: Refreshing state... [id=web-team-3-dev-db-subnet-group]
aws_route_table_association.private[1]: Refreshing state... [id=rtbassoc-0d27850a8a6e94ba5]
aws_instance.app: Refreshing state... [id=i-09f54da883306a39e]
aws_route_table_association.public[0]: Refreshing state... [id=rtbassoc-099953f254a4d5809]
aws_route_table_association.public[1]: Refreshing state... [id=rtbassoc-03c01253dea21ea7b]
aws_db_instance.main: Refreshing state... [id=db-CDWN44WOQ6PTQFDBPY6KNBS2ME]
aws_eip.app: Refreshing state... [id=eipalloc-0b8749a716be29355]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # aws_instance.app will be updated in-place
  ~ resource "aws_instance" "app" {
        id                                   = "i-09f54da883306a39e"
      ~ public_dns                           = "ec2-43-203-94-76.ap-northeast-2.compute.amazonaws.com" -> (known after apply)
      ~ public_ip                            = "43.203.94.76" -> (known after apply)
        tags                                 = {
            "Name" = "web-team-3-dev-app-server"
        }
      ~ user_data                            = "0a0720645d553bc20bab560678b53f2415a60f79" -> "d44f83f405fc7f74822a309cb366f5ce55ff77a2"
        # (30 unchanged attributes hidden)

        # (8 unchanged blocks hidden)
    }

  # aws_route53_record.api will be created
  + resource "aws_route53_record" "api" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "api.moaofficial.kr"
      + records         = [
          + "43.203.94.76",
        ]
      + ttl             = 300
      + type            = "A"
      + zone_id         = "Z093699513LDAGIAMRGKU"
    }

Plan: 1 to add, 1 to change, 0 to destroy.

Changes to Outputs:
  + api_domain                 = "https://api.moaofficial.kr"
  + api_domain_name            = "api.moaofficial.kr"
  + ssl_setup_command          = "sudo certbot --nginx -d api.moaofficial.kr"

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pushed by: @catturtle123, Action: pull_request

@catturtle123 catturtle123 merged commit 38bc070 into dev Jan 31, 2026
2 of 3 checks passed
@catturtle123 catturtle123 deleted the ci/69-infra-sync-https branch January 31, 2026 11:52
catturtle123 added a commit that referenced this pull request Jan 31, 2026
* πŸ’š ci: Route53 A λ ˆμ½”λ“œ 및 HTTPS μ„€μ • μΆ”κ°€ (#69)

- Route53 A λ ˆμ½”λ“œ μΆ”κ°€ (api.moaofficial.kr -> EC2 EIP)
- EC2 user_data에 Nginx + Certbot(snap) μ„€μΉ˜ μΆ”κ°€
- Nginx λ¦¬λ²„μŠ€ ν”„λ‘μ‹œ μ„€μ • (localhost:8080)
- SSL μΈμ¦μ„œ μˆ˜λ™ λ°œκΈ‰ 슀크립트 μΆ”κ°€
- domain_name, api_subdomain, ssl_email λ³€μˆ˜ μΆ”κ°€

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* πŸ’š ci: EC2 Swap λ©”λͺ¨λ¦¬ 2GB μ„€μ • μΆ”κ°€ (#69)

- t3.micro λ©”λͺ¨λ¦¬ λΆ€μ‘± λŒ€λΉ„ 2GB swap μ„€μ •
- λΆ€νŒ… μ‹œ μžλ™ 마운트 (/etc/fstab)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ’š ci/cd: infra 싱크 λ§žμΆ”κΈ° 및 https ν•˜κΈ°

2 participants