aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-01-01 21:30:02 -0800
committerGitHub <[email protected]>2023-01-01 21:30:02 -0800
commit246d8da4b825d6a622a4d9efbcf7f0d3b3724222 (patch)
tree895b5bec1507fa87cf0d3145ee00a9c488b96dce
parent1da9d7731b8cda1f433bb5b33a3922716844b1bb (diff)
parent999e9e97d314e1702fa455abd9526042ef90b09d (diff)
downloadjinwei.me-246d8da4b825d6a622a4d9efbcf7f0d3b3724222.tar.gz
Merge pull request #2 from clarkzjw/bean.jinwei.me
infra: add docker username and token into aws ssm
-rw-r--r--jinwei.me/infra/cloudflare.tf10
-rw-r--r--jinwei.me/infra/dockerhub.tf11
-rw-r--r--jinwei.me/infra/variables.tf12
3 files changed, 33 insertions, 0 deletions
diff --git a/jinwei.me/infra/cloudflare.tf b/jinwei.me/infra/cloudflare.tf
index d0f7b8a..bb26eb5 100644
--- a/jinwei.me/infra/cloudflare.tf
+++ b/jinwei.me/infra/cloudflare.tf
@@ -46,6 +46,16 @@ resource "cloudflare_tunnel_config" "tunnel_route" {
46 service = "http://127.0.0.1:30081" 46 service = "http://127.0.0.1:30081"
47 } 47 }
48 ingress_rule { 48 ingress_rule {
49 hostname = "bean.jinwei.me"
50 path = "/"
51 service = "http://127.0.0.1:30082"
52 }
53 ingress_rule {
54 hostname = "beanweb.jinwei.me"
55 path = "/"
56 service = "http://127.0.0.1:30083"
57 }
58 ingress_rule {
49 service = "http_status:404" 59 service = "http_status:404"
50 } 60 }
51 } 61 }
diff --git a/jinwei.me/infra/dockerhub.tf b/jinwei.me/infra/dockerhub.tf
new file mode 100644
index 0000000..00a3bf2
--- /dev/null
+++ b/jinwei.me/infra/dockerhub.tf
@@ -0,0 +1,11 @@
1resource "aws_ssm_parameter" "dockerhub_username" {
2 name = "/${local.name}/docker/username"
3 type = "SecureString"
4 value = var.dockerhub_username
5}
6
7resource "aws_ssm_parameter" "dockerhub_token" {
8 name = "/${local.name}/docker/token"
9 type = "SecureString"
10 value = var.dockerhub_token
11}
diff --git a/jinwei.me/infra/variables.tf b/jinwei.me/infra/variables.tf
index 04c1331..f364ef4 100644
--- a/jinwei.me/infra/variables.tf
+++ b/jinwei.me/infra/variables.tf
@@ -88,3 +88,15 @@ variable "hetzner_storagebox" {
88 type = string 88 type = string
89 sensitive = true 89 sensitive = true
90} 90}
91
92variable "dockerhub_username" {
93 description = "dockerhub username"
94 type = string
95 sensitive = true
96}
97
98variable "dockerhub_token" {
99 description = "dockerhub token"
100 type = string
101 sensitive = true
102}
Powered by cgit v1.2.3 (git 2.41.0)