aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jinwei.me/config/roles/debian_init/defaults/main.yaml1
-rw-r--r--jinwei.me/infra/acm.tf6
-rw-r--r--jinwei.me/infra/cloudflare.tf2
-rw-r--r--jinwei.me/infra/data.tf1
-rw-r--r--jinwei.me/infra/outputs.tf4
-rw-r--r--jinwei.me/infra/variables.tf8
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 @@
1user_home: /home/clarkzjw 1user_home: /home/clarkzjw
2cloudflare_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" {
35# Cloudflare validation record 35# Cloudflare validation record
36resource "cloudflare_record" "acm" { 36resource "cloudflare_record" "acm" {
37 zone_id = data.cloudflare_zones.domain.zones[0].id 37 zone_id = data.cloudflare_zones.domain.zones[0].id
38 name = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_name 38 name = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_name
39 type = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_type 39 type = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_type
40 value = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_value 40 value = tolist(aws_acm_certificate.main.domain_validation_options)[0].resource_record_value
41} 41}
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" {
43 ingress_rule { 43 ingress_rule {
44 hostname = "next.jinwei.me" 44 hostname = "next.jinwei.me"
45 path = "/" 45 path = "/"
46 service = "http://127.0.0.1:30080" 46 service = "http://wordpress:80"
47 } 47 }
48 ingress_rule { 48 ingress_rule {
49 service = "http_status:404" 49 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" {
9} 9}
10 10
11data "aws_availability_zones" "available" {} 11data "aws_availability_zones" "available" {}
12data "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" {
32 description = "S3 bucket for wordpress" 32 description = "S3 bucket for wordpress"
33 value = { 33 value = {
34 bucket_domain_name = aws_s3_bucket.main.bucket_regional_domain_name 34 bucket_domain_name = aws_s3_bucket.main.bucket_regional_domain_name
35 policy = aws_s3_bucket_policy.main.policy 35 policy = aws_s3_bucket_policy.main.policy
36 } 36 }
37} 37}
38 38
39output "tunnel" { 39output "tunnel" {
40 value = cloudflare_argo_tunnel.tunnel 40 value = cloudflare_argo_tunnel.tunnel.tunnel_token
41 sensitive = true 41 sensitive = true
42} 42}
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" {
51} 51}
52 52
53variable "site_domain" { 53variable "site_domain" {
54 type = string 54 type = string
55 default = "jinwei.me" 55 default = "jinwei.me"
56} 56}
57 57
58variable "s3_cdn_name" { 58variable "s3_cdn_name" {
59 type = string 59 type = string
60 default = "static" 60 default = "static"
61} 61}
62 62
63variable "s3_cloudfront_name" { 63variable "s3_cloudfront_name" {
64 type = string 64 type = string
65 default = "static.jinwei.me" 65 default = "static.jinwei.me"
66} 66}
67 67
Powered by cgit v1.2.3 (git 2.41.0)