From faffe52c36dcc02eb9b5fa2671e2c0dabac246d2 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Sun, 11 Dec 2022 02:15:39 -0800 Subject: infra: fmt --- jinwei.me/config/roles/debian_init/defaults/main.yaml | 1 + jinwei.me/infra/acm.tf | 6 +++--- jinwei.me/infra/cloudflare.tf | 2 +- jinwei.me/infra/data.tf | 1 - jinwei.me/infra/outputs.tf | 4 ++-- jinwei.me/infra/variables.tf | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jinwei.me/config/roles/debian_init/defaults/main.yaml b/jinwei.me/config/roles/debian_init/defaults/main.yaml index 685f0b6..f1cc1f5 100644 --- a/jinwei.me/config/roles/debian_init/defaults/main.yaml +++ b/jinwei.me/config/roles/debian_init/defaults/main.yaml @@ -1 +1,2 @@ user_home: /home/clarkzjw +cloudflare_deb_url: https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb diff --git a/jinwei.me/infra/acm.tf b/jinwei.me/infra/acm.tf index c6900cd..c26f568 100644 --- a/jinwei.me/infra/acm.tf +++ b/jinwei.me/infra/acm.tf @@ -35,7 +35,7 @@ resource "aws_acm_certificate_validation" "us-east-1" { # Cloudflare validation record resource "cloudflare_record" "acm" { zone_id = data.cloudflare_zones.domain.zones[0].id - name = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_name - type = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_type - value = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_value + name = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_name + type = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_type + value = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_value } diff --git a/jinwei.me/infra/cloudflare.tf b/jinwei.me/infra/cloudflare.tf index 4f23b40..1d8ebdc 100644 --- a/jinwei.me/infra/cloudflare.tf +++ b/jinwei.me/infra/cloudflare.tf @@ -43,7 +43,7 @@ resource "cloudflare_tunnel_config" "tunnel_route" { ingress_rule { hostname = "next.jinwei.me" path = "/" - service = "http://127.0.0.1:30080" + service = "http://wordpress:80" } ingress_rule { service = "http_status:404" diff --git a/jinwei.me/infra/data.tf b/jinwei.me/infra/data.tf index 8c461e4..2102273 100644 --- a/jinwei.me/infra/data.tf +++ b/jinwei.me/infra/data.tf @@ -9,4 +9,3 @@ data "aws_ami" "debian" { } data "aws_availability_zones" "available" {} -data "cloudflare_ip_ranges" "cloudflare" {} diff --git a/jinwei.me/infra/outputs.tf b/jinwei.me/infra/outputs.tf index 46c9486..08d8d73 100644 --- a/jinwei.me/infra/outputs.tf +++ b/jinwei.me/infra/outputs.tf @@ -32,11 +32,11 @@ output "s3" { description = "S3 bucket for wordpress" value = { bucket_domain_name = aws_s3_bucket.main.bucket_regional_domain_name - policy = aws_s3_bucket_policy.main.policy + policy = aws_s3_bucket_policy.main.policy } } output "tunnel" { - value = cloudflare_argo_tunnel.tunnel + value = cloudflare_argo_tunnel.tunnel.tunnel_token sensitive = true } diff --git a/jinwei.me/infra/variables.tf b/jinwei.me/infra/variables.tf index 192424c..87283cc 100644 --- a/jinwei.me/infra/variables.tf +++ b/jinwei.me/infra/variables.tf @@ -51,17 +51,17 @@ variable "ec2_instance_type" { } variable "site_domain" { - type = string - default = "jinwei.me" + type = string + default = "jinwei.me" } variable "s3_cdn_name" { - type = string + type = string default = "static" } variable "s3_cloudfront_name" { - type = string + type = string default = "static.jinwei.me" } -- cgit v1.2.3