From bb57b4ce3e05b86523290ed7abbd496492427809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Tue, 7 Nov 2023 23:42:09 +0900 Subject: [PATCH 01/13] =?UTF-8?q?chore=20::=20class=20naming=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- elasticcache.tf => elasticache.tf | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename elasticcache.tf => elasticache.tf (100%) diff --git a/elasticcache.tf b/elasticache.tf similarity index 100% rename from elasticcache.tf rename to elasticache.tf From fffd84ce76b920a0e062ec26970b95707b6a286b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Tue, 7 Nov 2023 23:42:45 +0900 Subject: [PATCH 02/13] =?UTF-8?q?add=20::=20provider=20->=20cloudflare=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- provider.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provider.tf b/provider.tf index 05f43ee..e810fbf 100644 --- a/provider.tf +++ b/provider.tf @@ -5,6 +5,10 @@ terraform { source = "hashicorp/aws" version = "~> 4.46" } + cloudflare = { + source = "cloudflare/cloudflare" + version = "~> 4.0" + } } cloud { hostname = "app.terraform.io" From c23f6bd8d9f28394ff15dc30a9394553f5bcfe81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 21:51:51 +0900 Subject: [PATCH 03/13] =?UTF-8?q?add=20::=20cloudflare=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20variables=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- variables.tf | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index cfc06a2..c091636 100644 --- a/variables.tf +++ b/variables.tf @@ -1,4 +1,47 @@ variable "rds_master_password" { - type = string - default = "password" + type = string } + +variable "cloudflare_api_token" { + type = string +} + +variable "cloudflare_email" { + type = string +} + +variable "xquare_cloudflare_zone_id" { + type = string +} + +variable "xquare_cname_value" { + type = string +} + +variable "xquare_design" { + type = string +} + +variable "xquare_mysql" { + type = string +} + +variable "xquare_redis" { + type = string +} + +variable "pick_cloudflare_zone_id" { + type = string +} + +variable "repo_cloudflare_zone_id" { + type = string +} + +variable "repo_a_value" { + type = string +} + +variable "repo_resume" { + type = string +} \ No newline at end of file From 00aabd89e4dc98700d13e7a2462870f8209280b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 21:52:00 +0900 Subject: [PATCH 04/13] =?UTF-8?q?add=20::=20cloudflaredns=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf | 129 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 cloudflaredns.tf diff --git a/cloudflaredns.tf b/cloudflaredns.tf new file mode 100644 index 0000000..387f3f5 --- /dev/null +++ b/cloudflaredns.tf @@ -0,0 +1,129 @@ +locals { + a_recode_type = "A" + cname_recode_type = "CNAME" + xquare_design = "design" + xquare_mysql = "mysql" + xquare_redis = "redis" + xquare_cname_recode_names = [ + "admin", + "argo-cd", + "cloud-config", + "dex-login", + "dex", + "grafana", + "infisical", + "jaeger", + "keycloak", + "kiali", + "oidc-proxy", + "prod-server", + "project", + "service", + "stag-server", + "thanos-store", + "thanos", + ] + pick_cname_recode_names = [ + "admin", + "teacher", + ] + repo_a_recode_names = [ + "admin", + "mariadb", + "mongodb", + "server", + ] + repo_cname_recode_names = [ + "admin", + "mariadb", + "mongodb", + "server", + "api", + "teacher", + "test", + "user", + "www", + ] + repo_resume = "resume" +} + +provider "cloudflare" { + api_token = var.cloudflare_api_token + email = var.cloudflare_email +} + +resource "cloudflare_record" "xquare_cname_record" { + for_each = toset(local.xquare_cname_recode_names) + name = each.value + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_cname_value + zone_id = var.xquare_cloudflare_zone_id +} + +resource "cloudflare_record" "pick_cname_record" { + for_each = toset(local.pick_cname_recode_names) + name = each.value + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_cname_value + zone_id = var.pick_cloudflare_zone_id +} + +resource "cloudflare_record" "repo_cname_record" { + for_each = toset(local.repo_cname_recode_names) + name = each.value + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_cname_value + zone_id = var.repo_cloudflare_zone_id +} + +resource "cloudflare_record" "repo_a_record" { + for_each = toset(local.repo_a_recode_names) + name = each.value + proxied = false + ttl = 1 + type = local.a_recode_type + value = var.repo_a_value + zone_id = var.repo_cloudflare_zone_id +} + +resource "cloudflare_record" "xquare_design" { + name = local.xquare_design + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_design + zone_id = var.xquare_cloudflare_zone_id +} + +resource "cloudflare_record" "xquare_mysql" { + name = local.xquare_mysql + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_mysql + zone_id = var.xquare_cloudflare_zone_id +} + +resource "cloudflare_record" "xquare_redis" { + name = local.xquare_redis + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.xquare_redis + zone_id = var.xquare_cloudflare_zone_id +} + +resource "cloudflare_record" "repo_resume" { + name = local.repo_resume + proxied = false + ttl = 1 + type = local.cname_recode_type + value = var.repo_resume + zone_id = var.repo_cloudflare_zone_id +} \ No newline at end of file From f2734db64567d76afbf1e93edff59ddf9e870893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 21:58:55 +0900 Subject: [PATCH 05/13] =?UTF-8?q?chore=20::=20email=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf | 1 - variables.tf | 4 ---- 2 files changed, 5 deletions(-) diff --git a/cloudflaredns.tf b/cloudflaredns.tf index 387f3f5..2379f9e 100644 --- a/cloudflaredns.tf +++ b/cloudflaredns.tf @@ -49,7 +49,6 @@ locals { provider "cloudflare" { api_token = var.cloudflare_api_token - email = var.cloudflare_email } resource "cloudflare_record" "xquare_cname_record" { diff --git a/variables.tf b/variables.tf index c091636..cb92bcd 100644 --- a/variables.tf +++ b/variables.tf @@ -6,10 +6,6 @@ variable "cloudflare_api_token" { type = string } -variable "cloudflare_email" { - type = string -} - variable "xquare_cloudflare_zone_id" { type = string } From 38bab33dd564e6b257a16a506135f436686e21be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 22:45:08 +0900 Subject: [PATCH 06/13] =?UTF-8?q?chore=20::=20recode=20->=20record=20?= =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/cloudflaredns.tf b/cloudflaredns.tf index 2379f9e..a47339c 100644 --- a/cloudflaredns.tf +++ b/cloudflaredns.tf @@ -1,10 +1,10 @@ locals { - a_recode_type = "A" - cname_recode_type = "CNAME" + a_record_type = "A" + cname_record_type = "CNAME" xquare_design = "design" xquare_mysql = "mysql" xquare_redis = "redis" - xquare_cname_recode_names = [ + xquare_cname_record_names = [ "admin", "argo-cd", "cloud-config", @@ -23,17 +23,17 @@ locals { "thanos-store", "thanos", ] - pick_cname_recode_names = [ + pick_cname_record_names = [ "admin", "teacher", ] - repo_a_recode_names = [ + repo_a_record_names = [ "admin", "mariadb", "mongodb", "server", ] - repo_cname_recode_names = [ + repo_cname_record_names = [ "admin", "mariadb", "mongodb", @@ -52,41 +52,41 @@ provider "cloudflare" { } resource "cloudflare_record" "xquare_cname_record" { - for_each = toset(local.xquare_cname_recode_names) + for_each = toset(local.xquare_cname_record_names) name = each.value proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_cname_value zone_id = var.xquare_cloudflare_zone_id } resource "cloudflare_record" "pick_cname_record" { - for_each = toset(local.pick_cname_recode_names) + for_each = toset(local.pick_cname_record_names) name = each.value proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_cname_value zone_id = var.pick_cloudflare_zone_id } resource "cloudflare_record" "repo_cname_record" { - for_each = toset(local.repo_cname_recode_names) + for_each = toset(local.repo_cname_record_names) name = each.value proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_cname_value zone_id = var.repo_cloudflare_zone_id } resource "cloudflare_record" "repo_a_record" { - for_each = toset(local.repo_a_recode_names) + for_each = toset(local.repo_a_record_names) name = each.value proxied = false ttl = 1 - type = local.a_recode_type + type = local.a_record_type value = var.repo_a_value zone_id = var.repo_cloudflare_zone_id } @@ -95,7 +95,7 @@ resource "cloudflare_record" "xquare_design" { name = local.xquare_design proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_design zone_id = var.xquare_cloudflare_zone_id } @@ -104,7 +104,7 @@ resource "cloudflare_record" "xquare_mysql" { name = local.xquare_mysql proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_mysql zone_id = var.xquare_cloudflare_zone_id } @@ -113,7 +113,7 @@ resource "cloudflare_record" "xquare_redis" { name = local.xquare_redis proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.xquare_redis zone_id = var.xquare_cloudflare_zone_id } @@ -122,7 +122,7 @@ resource "cloudflare_record" "repo_resume" { name = local.repo_resume proxied = false ttl = 1 - type = local.cname_recode_type + type = local.cname_record_type value = var.repo_resume zone_id = var.repo_cloudflare_zone_id } \ No newline at end of file From b5634786b9f0828e7cc9b82bb00ca071642dae80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 22:46:26 +0900 Subject: [PATCH 07/13] =?UTF-8?q?chore=20::=20a=20=EB=A0=88=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=A4=91=EB=B3=B5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cloudflaredns.tf b/cloudflaredns.tf index a47339c..09dcdb6 100644 --- a/cloudflaredns.tf +++ b/cloudflaredns.tf @@ -34,10 +34,6 @@ locals { "server", ] repo_cname_record_names = [ - "admin", - "mariadb", - "mongodb", - "server", "api", "teacher", "test", From e21da1da8e4299a5aad982006beaaadffdb715a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 22:54:52 +0900 Subject: [PATCH 08/13] =?UTF-8?q?chore=20::=20record=20name=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=ED=86=B5=EC=9D=BC=20=EB=B0=8F=20=EC=9A=A9=EB=8F=84?= =?UTF-8?q?=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=ED=91=9C=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cloudflaredns.tf b/cloudflaredns.tf index 09dcdb6..3dae752 100644 --- a/cloudflaredns.tf +++ b/cloudflaredns.tf @@ -1,10 +1,10 @@ locals { a_record_type = "A" cname_record_type = "CNAME" - xquare_design = "design" - xquare_mysql = "mysql" - xquare_redis = "redis" - xquare_cname_record_names = [ + xquare_design_record_name = "design" + xquare_mysql_record_name = "mysql" + xquare_redis_record_name = "redis" + xquare_server_record_names = [ "admin", "argo-cd", "cloud-config", @@ -23,17 +23,17 @@ locals { "thanos-store", "thanos", ] - pick_cname_record_names = [ + pick_server_record_names = [ "admin", "teacher", ] - repo_a_record_names = [ + repo_on_premise_record_names = [ "admin", "mariadb", "mongodb", "server", ] - repo_cname_record_names = [ + repo_server_record_names = [ "api", "teacher", "test", @@ -48,7 +48,7 @@ provider "cloudflare" { } resource "cloudflare_record" "xquare_cname_record" { - for_each = toset(local.xquare_cname_record_names) + for_each = toset(local.xquare_server_record_names) name = each.value proxied = false ttl = 1 @@ -58,7 +58,7 @@ resource "cloudflare_record" "xquare_cname_record" { } resource "cloudflare_record" "pick_cname_record" { - for_each = toset(local.pick_cname_record_names) + for_each = toset(local.pick_server_record_names) name = each.value proxied = false ttl = 1 @@ -68,7 +68,7 @@ resource "cloudflare_record" "pick_cname_record" { } resource "cloudflare_record" "repo_cname_record" { - for_each = toset(local.repo_cname_record_names) + for_each = toset(local.repo_server_record_names) name = each.value proxied = false ttl = 1 @@ -78,7 +78,7 @@ resource "cloudflare_record" "repo_cname_record" { } resource "cloudflare_record" "repo_a_record" { - for_each = toset(local.repo_a_record_names) + for_each = toset(local.repo_on_premise_record_names) name = each.value proxied = false ttl = 1 @@ -87,8 +87,8 @@ resource "cloudflare_record" "repo_a_record" { zone_id = var.repo_cloudflare_zone_id } -resource "cloudflare_record" "xquare_design" { - name = local.xquare_design +resource "cloudflare_record" "xquare_design_record_name" { + name = local.xquare_design_record_name proxied = false ttl = 1 type = local.cname_record_type @@ -97,7 +97,7 @@ resource "cloudflare_record" "xquare_design" { } resource "cloudflare_record" "xquare_mysql" { - name = local.xquare_mysql + name = local.xquare_mysql_record_name proxied = false ttl = 1 type = local.cname_record_type @@ -106,7 +106,7 @@ resource "cloudflare_record" "xquare_mysql" { } resource "cloudflare_record" "xquare_redis" { - name = local.xquare_redis + name = local.xquare_redis_record_name proxied = false ttl = 1 type = local.cname_record_type From 88d6643335dfe3de6bdcdf55391c83a7be2a971d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 22:56:16 +0900 Subject: [PATCH 09/13] =?UTF-8?q?chore=20::=20cloudflaredns=20->=20cloudfl?= =?UTF-8?q?are=EB=A1=9C=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflaredns.tf => cloudflare.tf | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename cloudflaredns.tf => cloudflare.tf (93%) diff --git a/cloudflaredns.tf b/cloudflare.tf similarity index 93% rename from cloudflaredns.tf rename to cloudflare.tf index 3dae752..263d5c7 100644 --- a/cloudflaredns.tf +++ b/cloudflare.tf @@ -1,9 +1,14 @@ +provider "cloudflare" { + api_token = var.cloudflare_api_token +} + locals { - a_record_type = "A" - cname_record_type = "CNAME" - xquare_design_record_name = "design" - xquare_mysql_record_name = "mysql" - xquare_redis_record_name = "redis" + a_record_type = "A" + cname_record_type = "CNAME" + + xquare_design_record_name = "design" + xquare_mysql_record_name = "mysql" + xquare_redis_record_name = "redis" xquare_server_record_names = [ "admin", "argo-cd", @@ -43,10 +48,6 @@ locals { repo_resume = "resume" } -provider "cloudflare" { - api_token = var.cloudflare_api_token -} - resource "cloudflare_record" "xquare_cname_record" { for_each = toset(local.xquare_server_record_names) name = each.value From 7da634043b6fcebf903d9281f8ea0c2fd184768a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 22:56:40 +0900 Subject: [PATCH 10/13] =?UTF-8?q?chore=20::=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=A0=88=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflare.tf | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cloudflare.tf b/cloudflare.tf index 263d5c7..633a890 100644 --- a/cloudflare.tf +++ b/cloudflare.tf @@ -45,7 +45,6 @@ locals { "user", "www", ] - repo_resume = "resume" } resource "cloudflare_record" "xquare_cname_record" { @@ -114,12 +113,3 @@ resource "cloudflare_record" "xquare_redis" { value = var.xquare_redis zone_id = var.xquare_cloudflare_zone_id } - -resource "cloudflare_record" "repo_resume" { - name = local.repo_resume - proxied = false - ttl = 1 - type = local.cname_record_type - value = var.repo_resume - zone_id = var.repo_cloudflare_zone_id -} \ No newline at end of file From 8a44f48eba4dcbc1919e0b9c813a504e14d4412b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 23:07:51 +0900 Subject: [PATCH 11/13] =?UTF-8?q?chore=20::=20variable=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=EB=93=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflare.tf | 32 ++++++++++++++++---------------- variables.tf | 18 +++++++----------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/cloudflare.tf b/cloudflare.tf index 633a890..28d5266 100644 --- a/cloudflare.tf +++ b/cloudflare.tf @@ -6,9 +6,9 @@ locals { a_record_type = "A" cname_record_type = "CNAME" - xquare_design_record_name = "design" - xquare_mysql_record_name = "mysql" - xquare_redis_record_name = "redis" + xquare_design_domain_record_name = "design" + xquare_mysql_domain_record_name = "mysql" + xquare_redis_domain_record_name = "redis" xquare_server_record_names = [ "admin", "argo-cd", @@ -53,7 +53,7 @@ resource "cloudflare_record" "xquare_cname_record" { proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_cname_value + value = var.xquare_server_domain zone_id = var.xquare_cloudflare_zone_id } @@ -63,7 +63,7 @@ resource "cloudflare_record" "pick_cname_record" { proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_cname_value + value = var.xquare_server_domain zone_id = var.pick_cloudflare_zone_id } @@ -73,7 +73,7 @@ resource "cloudflare_record" "repo_cname_record" { proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_cname_value + value = var.xquare_server_domain zone_id = var.repo_cloudflare_zone_id } @@ -83,33 +83,33 @@ resource "cloudflare_record" "repo_a_record" { proxied = false ttl = 1 type = local.a_record_type - value = var.repo_a_value + value = var.repo_on_premise_ip zone_id = var.repo_cloudflare_zone_id } -resource "cloudflare_record" "xquare_design_record_name" { - name = local.xquare_design_record_name +resource "cloudflare_record" "xquare_design_domain_record_name" { + name = local.xquare_design_domain_record_name proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_design + value = var.xquare_design_domain zone_id = var.xquare_cloudflare_zone_id } -resource "cloudflare_record" "xquare_mysql" { - name = local.xquare_mysql_record_name +resource "cloudflare_record" "xquare_mysql_domain" { + name = local.xquare_mysql_domain_record_name proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_mysql + value = var.xquare_mysql_domain zone_id = var.xquare_cloudflare_zone_id } -resource "cloudflare_record" "xquare_redis" { - name = local.xquare_redis_record_name +resource "cloudflare_record" "xquare_redis_domain" { + name = local.xquare_redis_domain_record_name proxied = false ttl = 1 type = local.cname_record_type - value = var.xquare_redis + value = var.xquare_redis_domain zone_id = var.xquare_cloudflare_zone_id } diff --git a/variables.tf b/variables.tf index cb92bcd..1365809 100644 --- a/variables.tf +++ b/variables.tf @@ -10,34 +10,30 @@ variable "xquare_cloudflare_zone_id" { type = string } -variable "xquare_cname_value" { - type = string -} - -variable "xquare_design" { +variable "pick_cloudflare_zone_id" { type = string } -variable "xquare_mysql" { +variable "repo_cloudflare_zone_id" { type = string } -variable "xquare_redis" { +variable "xquare_server_domain" { type = string } -variable "pick_cloudflare_zone_id" { +variable "xquare_design_domain" { type = string } -variable "repo_cloudflare_zone_id" { +variable "xquare_mysql_domain" { type = string } -variable "repo_a_value" { +variable "xquare_redis_domain" { type = string } -variable "repo_resume" { +variable "repo_on_premise_ip" { type = string } \ No newline at end of file From 91ad532072bcf2b6b3860e8c294b687966210610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 23:17:22 +0900 Subject: [PATCH 12/13] =?UTF-8?q?chore=20::=20resource=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflare.tf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cloudflare.tf b/cloudflare.tf index 28d5266..1a26f4e 100644 --- a/cloudflare.tf +++ b/cloudflare.tf @@ -6,10 +6,10 @@ locals { a_record_type = "A" cname_record_type = "CNAME" - xquare_design_domain_record_name = "design" - xquare_mysql_domain_record_name = "mysql" - xquare_redis_domain_record_name = "redis" - xquare_server_record_names = [ + xquare_design_domain_record_name = "design" + xquare_mysql_domain_record_name = "mysql" + xquare_redis_domain_record_name = "redis" + xquare_server_record_names = [ "admin", "argo-cd", "cloud-config", @@ -47,7 +47,7 @@ locals { ] } -resource "cloudflare_record" "xquare_cname_record" { +resource "cloudflare_record" "xquare_server_record" { for_each = toset(local.xquare_server_record_names) name = each.value proxied = false @@ -57,7 +57,7 @@ resource "cloudflare_record" "xquare_cname_record" { zone_id = var.xquare_cloudflare_zone_id } -resource "cloudflare_record" "pick_cname_record" { +resource "cloudflare_record" "pick_server_record" { for_each = toset(local.pick_server_record_names) name = each.value proxied = false @@ -67,7 +67,7 @@ resource "cloudflare_record" "pick_cname_record" { zone_id = var.pick_cloudflare_zone_id } -resource "cloudflare_record" "repo_cname_record" { +resource "cloudflare_record" "repo_server_record" { for_each = toset(local.repo_server_record_names) name = each.value proxied = false @@ -77,7 +77,7 @@ resource "cloudflare_record" "repo_cname_record" { zone_id = var.repo_cloudflare_zone_id } -resource "cloudflare_record" "repo_a_record" { +resource "cloudflare_record" "repo_on_premise_record" { for_each = toset(local.repo_on_premise_record_names) name = each.value proxied = false @@ -87,7 +87,7 @@ resource "cloudflare_record" "repo_a_record" { zone_id = var.repo_cloudflare_zone_id } -resource "cloudflare_record" "xquare_design_domain_record_name" { +resource "cloudflare_record" "xquare_design_record" { name = local.xquare_design_domain_record_name proxied = false ttl = 1 @@ -96,7 +96,7 @@ resource "cloudflare_record" "xquare_design_domain_record_name" { zone_id = var.xquare_cloudflare_zone_id } -resource "cloudflare_record" "xquare_mysql_domain" { +resource "cloudflare_record" "xquare_mysql_record" { name = local.xquare_mysql_domain_record_name proxied = false ttl = 1 @@ -105,11 +105,11 @@ resource "cloudflare_record" "xquare_mysql_domain" { zone_id = var.xquare_cloudflare_zone_id } -resource "cloudflare_record" "xquare_redis_domain" { +resource "cloudflare_record" "xquare_redis_record" { name = local.xquare_redis_domain_record_name proxied = false ttl = 1 type = local.cname_record_type value = var.xquare_redis_domain zone_id = var.xquare_cloudflare_zone_id -} +} \ No newline at end of file From 8104744a8dfaaec682a4bdb9198927304518897b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=A0=95=ED=98=B8?= Date: Wed, 8 Nov 2023 23:30:56 +0900 Subject: [PATCH 13/13] =?UTF-8?q?chore=20::=20local=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflare.tf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cloudflare.tf b/cloudflare.tf index 1a26f4e..c183ef8 100644 --- a/cloudflare.tf +++ b/cloudflare.tf @@ -6,10 +6,10 @@ locals { a_record_type = "A" cname_record_type = "CNAME" - xquare_design_domain_record_name = "design" - xquare_mysql_domain_record_name = "mysql" - xquare_redis_domain_record_name = "redis" - xquare_server_record_names = [ + xquare_design_record_name = "design" + xquare_mysql_record_name = "mysql" + xquare_redis_record_name = "redis" + xquare_server_record_names = [ "admin", "argo-cd", "cloud-config", @@ -88,7 +88,7 @@ resource "cloudflare_record" "repo_on_premise_record" { } resource "cloudflare_record" "xquare_design_record" { - name = local.xquare_design_domain_record_name + name = local.xquare_design_record_name proxied = false ttl = 1 type = local.cname_record_type @@ -97,7 +97,7 @@ resource "cloudflare_record" "xquare_design_record" { } resource "cloudflare_record" "xquare_mysql_record" { - name = local.xquare_mysql_domain_record_name + name = local.xquare_mysql_record_name proxied = false ttl = 1 type = local.cname_record_type @@ -106,7 +106,7 @@ resource "cloudflare_record" "xquare_mysql_record" { } resource "cloudflare_record" "xquare_redis_record" { - name = local.xquare_redis_domain_record_name + name = local.xquare_redis_record_name proxied = false ttl = 1 type = local.cname_record_type