Zero-downtime migration from GCP to Tencent Cloud Design and implementation
Moved 80 servers and 20 databases of Summoners War: Chronicles from GCP to Tencent Cloud in about one week with no downtime.
Tencent security group resources (related public repository pf-03)
What this code does: Module code that creates a Tencent Cloud security group and its rules. The first block creates the security group with its name, description, project, and tags only when creation is enabled (local.create), and the second takes lists of inbound (ingress) and outbound (egress) rules as variables and applies them to that group at once. Because the rules come in as variables, firewall rules organized on GCP can be rewritten into this list format to stand up the same policy on Tencent.
resource "tencentcloud_security_group" "sg" {
count = local.create ? 1 : 0
name = var.name
description = var.description
project_id = var.project_id
tags = merge(var.tags, var.security_group_tags)
}
resource "tencentcloud_security_group_lite_rule" "lite_rule" {
count = var.create_lite_rule ? 1 : 0
security_group_id = local.this_sg_id
ingress = var.ingress_for_lite_rule
egress = var.egress_for_lite_rule
}