From a896e96ebf793b02cb801eaad76f05e0f5becd9d Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Sun, 28 Dec 2025 16:59:41 +0000 Subject: [PATCH 01/16] page.tsx --- stripe_to_invoice/app/page.tsx | 228 ++++++++++++++++++++++++++++++--- 1 file changed, 211 insertions(+), 17 deletions(-) diff --git a/stripe_to_invoice/app/page.tsx b/stripe_to_invoice/app/page.tsx index 931e83d..d68bb80 100644 --- a/stripe_to_invoice/app/page.tsx +++ b/stripe_to_invoice/app/page.tsx @@ -1,57 +1,251 @@ // app/page.tsx +// This page doubles as: +// 1. A landing page +// 2. A product spec +// 3. A reminder to future-me what the hell I was building +// +// If you’re reading this months later: hi 👋 +// The product is the automation, not the UI. export default function Home() { return ( -
+
- {/* What this is */} + {/* -------------------------------------------------- + Intro + -------------------------------------------------- */}

Stripe → Xero automation

+

Automatically create and mark Xero invoices as paid when a Stripe payment succeeds. - +
Built for people who value time more than pressing buttons.

- {/* Steps */} + {/* -------------------------------------------------- + High-level flow (human readable) + -------------------------------------------------- */}
-

How it works

+

How it works (high level)

+
    -
  1. Log in ( Set up magic link, db has been set up)
  2. -
  3. Connect Stripe
  4. -
  5. Connect Xero
  6. -
  7. Make a payment
  8. -
  9. Invoice appears in Xero as paid
  10. +
  11. Log in via magic link (passwordless)
  12. +
  13. Connect your Stripe account
  14. +
  15. Connect your Xero organisation
  16. +
  17. A Stripe payment succeeds
  18. +
  19. An invoice appears in Xero as paid
- {/* Proof */} + {/* -------------------------------------------------- + Magic link auth – detailed flow + -------------------------------------------------- */}
-

Proof, not promises

+

Login flow (magic link)

+

- Your next Stripe payment will automatically reconcile in Xero. - No manual matching. No “awaiting payment”. + Authentication is passwordless. We only store intent and proof of login. +

+ + {/* Text-based flow diagram (easy to read + copy) */} +
+{`Browser
+  |
+  | POST /auth/login (email)
+  v
+Backend
+  - find or create user
+  - generate token
+  - hash token
+  - store login_tokens row
+  - send email (SES)
+  |
+  v
+Email (magic link)
+  |
+  | GET /auth/callback?token=XYZ
+  v
+Backend
+  - hash token
+  - validate token (unused + not expired)
+  - mark token as used
+  - create session
+  |
+  v
+Set session cookie
+`}
+        
+ + {/* Step-by-step breakdown */} +
    +
  1. + User enters their email address. +
  2. + +
  3. + Backend creates (or finds) a user record and stores a one-time login token + in login_tokens. +
  4. + +
  5. + An email is sent containing a short-lived magic link. +
  6. + +
  7. + When the link is clicked, the token is validated, marked as used, + and a session is created. +
  8. + +
  9. + A secure session cookie is set. No passwords. No OAuth popups. +
  10. +
+
+ + {/* -------------------------------------------------- + Stripe → Xero automation flow + -------------------------------------------------- */} +
+

Stripe → Xero automation flow

+ +
+{`Stripe payment succeeds
+  |
+  | Webhook
+  v
+Backend
+  - verify Stripe event
+  - map payment to customer
+  - create Xero invoice
+  - mark invoice as paid
+  |
+  v
+Xero (reconciled automatically)
+`}
+        
+ +

+ Once connected, everything runs automatically. + No manual reconciliation. No “awaiting payment” state.

- {/* Pricing */} + {/* -------------------------------------------------- + Proof + -------------------------------------------------- */} +
+

Proof, not promises

+ +

+ Your next Stripe payment will automatically reconcile in Xero. +
+ No manual matching. No bookkeeping busywork. +

+
+ + {/* -------------------------------------------------- + Pricing + -------------------------------------------------- */}

Pricing

+

£200 / month — unlimited invoices.

- {/* CTA */} + {/* -------------------------------------------------- + Footer / reminder + -------------------------------------------------- */}

- This page is a placeholder. The product is the automation. + This page is intentionally simple. +
+ The product is the automation, not the UI.

+ +
+

Implementation notes (for future me)

+ +

+ These are the only docs needed to implement magic-link auth with Next.js + AWS SES. +

+ + +
+
) } From 20f0b8782874e14315eaa86765a2db8c880548a6 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Sun, 28 Dec 2025 18:31:48 +0000 Subject: [PATCH 02/16] push for migration on dev --- db/atlas/stripe_invoice/add_new_migration.sh | 1 + .../20251228182659_add_used_at_to_login_tokens.sql | 6 ++++++ db/atlas/stripe_invoice/migrations/atlas.sum | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/atlas/stripe_invoice/add_new_migration.sh create mode 100644 db/atlas/stripe_invoice/migrations/20251228182659_add_used_at_to_login_tokens.sql diff --git a/db/atlas/stripe_invoice/add_new_migration.sh b/db/atlas/stripe_invoice/add_new_migration.sh new file mode 100644 index 0000000..5d623b5 --- /dev/null +++ b/db/atlas/stripe_invoice/add_new_migration.sh @@ -0,0 +1 @@ +atlas migrate new add_used_at_to_login_tokens diff --git a/db/atlas/stripe_invoice/migrations/20251228182659_add_used_at_to_login_tokens.sql b/db/atlas/stripe_invoice/migrations/20251228182659_add_used_at_to_login_tokens.sql new file mode 100644 index 0000000..8717f7c --- /dev/null +++ b/db/atlas/stripe_invoice/migrations/20251228182659_add_used_at_to_login_tokens.sql @@ -0,0 +1,6 @@ +ALTER TABLE login_tokens +ADD COLUMN IF NOT EXISTS used_at TIMESTAMPTZ; + +CREATE INDEX IF NOT EXISTS idx_login_tokens_unused +ON login_tokens (id) +WHERE used_at IS NULL; diff --git a/db/atlas/stripe_invoice/migrations/atlas.sum b/db/atlas/stripe_invoice/migrations/atlas.sum index 37a363f..5959567 100644 --- a/db/atlas/stripe_invoice/migrations/atlas.sum +++ b/db/atlas/stripe_invoice/migrations/atlas.sum @@ -1,5 +1,6 @@ -h1:ELwFHTBDb63mdRBhmjXMMSpy05pUSVxH03zuUuHYAto= +h1:uc3d9fE1+yrhzeCK1AjgaYWVZi3SDA4DBWEIMaOsRak= 0001_init.sql h1:gzb02ZbjrrJkXOC+2qIZsngnj7A+29O2/b4awScPlPs= 0002_auth.sql h1:4NhBu26dIBMy9gxMxM3tf6Z2CS2kfKlGjFBj07T/aBw= 0003_stripe_xero.sql h1:E2bcdUDnondsXwbdIwVlZqR4DQwzcoDiyeRFJwVxXwg= 0004_login_tokens.sql h1:rj1KcWu/0znh2YvtI7JV8Z2nwtL5rZzONbPwX1P+/PI= +20251228182659_add_used_at_to_login_tokens.sql h1:TwPL+DRx03BtDsdAmUGAnGlvdVjAORllerefu+fCu/E= From 20a658e5ffc062d3f7545e23c086ea246a5547c6 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Sun, 28 Dec 2025 18:37:07 +0000 Subject: [PATCH 03/16] push for migration on dev --- db/atlas/stripe_invoice/migrations/atlas.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/atlas/stripe_invoice/migrations/atlas.sum b/db/atlas/stripe_invoice/migrations/atlas.sum index 5959567..227351f 100644 --- a/db/atlas/stripe_invoice/migrations/atlas.sum +++ b/db/atlas/stripe_invoice/migrations/atlas.sum @@ -1,6 +1,6 @@ -h1:uc3d9fE1+yrhzeCK1AjgaYWVZi3SDA4DBWEIMaOsRak= +h1:dTHZRXvfJ8E0dSqq2PAuMLfFFRSDvt3OzgJKEGeXz2g= 0001_init.sql h1:gzb02ZbjrrJkXOC+2qIZsngnj7A+29O2/b4awScPlPs= 0002_auth.sql h1:4NhBu26dIBMy9gxMxM3tf6Z2CS2kfKlGjFBj07T/aBw= 0003_stripe_xero.sql h1:E2bcdUDnondsXwbdIwVlZqR4DQwzcoDiyeRFJwVxXwg= 0004_login_tokens.sql h1:rj1KcWu/0znh2YvtI7JV8Z2nwtL5rZzONbPwX1P+/PI= -20251228182659_add_used_at_to_login_tokens.sql h1:TwPL+DRx03BtDsdAmUGAnGlvdVjAORllerefu+fCu/E= +20251228182659_add_used_at_to_login_tokens.sql h1:/0puYQvwBFzpfSKjiZj2XR/7Mui39lS/IbFZW1TPQOc= From 0adde42cd5081d19a1bd5b2217b959d840279485 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 00:25:57 +0000 Subject: [PATCH 04/16] README.md --- ses/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 ses/README.md diff --git a/ses/README.md b/ses/README.md new file mode 100644 index 0000000..a763929 --- /dev/null +++ b/ses/README.md @@ -0,0 +1 @@ +Files to set up a simple email service in AWS \ No newline at end of file From f466556ce46ea60b3f478f144377e66f564d4376 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 11:58:28 +0000 Subject: [PATCH 05/16] do terraform ses --- .../ses-juntekim}/README.md | 0 aws_environment/ses-juntekim/backend.tf | 8 +++++ aws_environment/ses-juntekim/iam.tf | 25 ++++++++++++++++ aws_environment/ses-juntekim/outputs.tf | 30 +++++++++++++++++++ aws_environment/ses-juntekim/provider.tf | 14 +++++++++ aws_environment/ses-juntekim/ses.tf | 12 ++++++++ aws_environment/ses-juntekim/terrform.tfvars | 1 + aws_environment/ses-juntekim/variables.tf | 14 +++++++++ 8 files changed, 104 insertions(+) rename {ses => aws_environment/ses-juntekim}/README.md (100%) create mode 100644 aws_environment/ses-juntekim/backend.tf create mode 100644 aws_environment/ses-juntekim/iam.tf create mode 100644 aws_environment/ses-juntekim/outputs.tf create mode 100644 aws_environment/ses-juntekim/provider.tf create mode 100644 aws_environment/ses-juntekim/ses.tf create mode 100644 aws_environment/ses-juntekim/terrform.tfvars create mode 100644 aws_environment/ses-juntekim/variables.tf diff --git a/ses/README.md b/aws_environment/ses-juntekim/README.md similarity index 100% rename from ses/README.md rename to aws_environment/ses-juntekim/README.md diff --git a/aws_environment/ses-juntekim/backend.tf b/aws_environment/ses-juntekim/backend.tf new file mode 100644 index 0000000..3a76cf0 --- /dev/null +++ b/aws_environment/ses-juntekim/backend.tf @@ -0,0 +1,8 @@ +terraform { + backend "s3" { + bucket = "juntekim-terraform-state" + key = "ses/terraform.tfstate" + region = "eu-west-2" + use_lockfile = true + } +} \ No newline at end of file diff --git a/aws_environment/ses-juntekim/iam.tf b/aws_environment/ses-juntekim/iam.tf new file mode 100644 index 0000000..5418c6a --- /dev/null +++ b/aws_environment/ses-juntekim/iam.tf @@ -0,0 +1,25 @@ +resource "aws_iam_user" "ses_smtp" { + name = "ses-smtp-${replace(var.email_domain, ".", "-")}" +} + +resource "aws_iam_user_policy" "ses_policy" { + user = aws_iam_user.ses_smtp.name + + policy = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Effect = "Allow" + Action = [ + "ses:SendEmail", + "ses:SendRawEmail" + ] + Resource = "*" + } + ] + }) +} + +resource "aws_iam_access_key" "ses_smtp" { + user = aws_iam_user.ses_smtp.name +} diff --git a/aws_environment/ses-juntekim/outputs.tf b/aws_environment/ses-juntekim/outputs.tf new file mode 100644 index 0000000..0e503aa --- /dev/null +++ b/aws_environment/ses-juntekim/outputs.tf @@ -0,0 +1,30 @@ +output "domain_verification_record" { + value = { + name = "_amazonses.${var.email_domain}" + type = "TXT" + value = aws_ses_domain_identity.this.verification_token + } +} + +output "dkim_records" { + value = [ + for token in aws_ses_domain_dkim.this.dkim_tokens : { + name = "${token}._domainkey.${var.email_domain}" + type = "CNAME" + value = "${token}.dkim.amazonses.com" + } + ] +} + +output "mail_from_domain" { + value = aws_ses_domain_mail_from.this.mail_from_domain +} + +output "smtp_username" { + value = aws_iam_access_key.ses_smtp.id +} + +output "smtp_secret" { + value = aws_iam_access_key.ses_smtp.secret + sensitive = true +} diff --git a/aws_environment/ses-juntekim/provider.tf b/aws_environment/ses-juntekim/provider.tf new file mode 100644 index 0000000..523bc37 --- /dev/null +++ b/aws_environment/ses-juntekim/provider.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 1.5" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +provider "aws" { + region = var.aws_region +} \ No newline at end of file diff --git a/aws_environment/ses-juntekim/ses.tf b/aws_environment/ses-juntekim/ses.tf new file mode 100644 index 0000000..fa3de7c --- /dev/null +++ b/aws_environment/ses-juntekim/ses.tf @@ -0,0 +1,12 @@ +resource "aws_ses_domain_identity" "this" { + domain = var.email_domain +} + +resource "aws_ses_domain_dkim" "this" { + domain = aws_ses_domain_identity.this.domain +} + +resource "aws_ses_domain_mail_from" "this" { + domain = aws_ses_domain_identity.this.domain + mail_from_domain = "${var.mail_from_subdomain}.${var.email_domain}" +} diff --git a/aws_environment/ses-juntekim/terrform.tfvars b/aws_environment/ses-juntekim/terrform.tfvars new file mode 100644 index 0000000..bb5eb1d --- /dev/null +++ b/aws_environment/ses-juntekim/terrform.tfvars @@ -0,0 +1 @@ +email_domain = "juntekim.com" diff --git a/aws_environment/ses-juntekim/variables.tf b/aws_environment/ses-juntekim/variables.tf new file mode 100644 index 0000000..b2fb037 --- /dev/null +++ b/aws_environment/ses-juntekim/variables.tf @@ -0,0 +1,14 @@ +variable "aws_region" { + type = string + default = "eu-west-2" +} + +variable "email_domain" { + type = string + description = "Domain used for SES email sending" +} + +variable "mail_from_subdomain" { + type = string + default = "mail" +} \ No newline at end of file From f083b6adab83ca13837bc523d41afa2d5645ab1d Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 12:05:32 +0000 Subject: [PATCH 06/16] workflow ses --- .github/workflows/ses-juntekim.yml | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/ses-juntekim.yml diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml new file mode 100644 index 0000000..b4c6b4e --- /dev/null +++ b/.github/workflows/ses-juntekim.yml @@ -0,0 +1,58 @@ +name: Terraform SES (mist) + +on: + pull_request: + paths: + - "aws_environment/ses-juntekim/**" + + push: + branches: + - main + paths: + - "aws_environment/ses-juntekim/**" + + workflow_dispatch: + +env: + TF_VERSION: "1.6.6" + WORKING_DIR: "aws_environment/ses-juntekim" + +jobs: + terraform: + name: Terraform SES + runs-on: mealcraft-runners + + permissions: + contents: read + pull-requests: write + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v3 + with: + terraform_version: ${{ env.TF_VERSION }} + + # Optional but recommended once + - name: Verify AWS identity + run: aws sts get-caller-identity + + - name: Terraform Init + working-directory: ${{ env.WORKING_DIR }} + run: terraform init + + - name: Terraform Validate + working-directory: ${{ env.WORKING_DIR }} + run: terraform validate + + - name: Terraform Plan + if: github.event_name == 'pull_request' + working-directory: ${{ env.WORKING_DIR }} + run: terraform plan + + - name: Terraform Apply + if: github.ref == 'refs/heads/main' + working-directory: ${{ env.WORKING_DIR }} + run: terraform apply -auto-approve From d5ef79950f8a6e21f993245608b3978e97b214ca Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 12:12:53 +0000 Subject: [PATCH 07/16] workflow ses --- .github/workflows/ses-juntekim.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index b4c6b4e..2281553 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -2,8 +2,6 @@ name: Terraform SES (mist) on: pull_request: - paths: - - "aws_environment/ses-juntekim/**" push: branches: @@ -35,6 +33,11 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} + - name: Install AWS CLI + run: | + sudo apt-get update + sudo apt-get install -y awscli + # Optional but recommended once - name: Verify AWS identity run: aws sts get-caller-identity From 20c55b90bf5f244f7b2d6495179372ef971786a0 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 12:14:52 +0000 Subject: [PATCH 08/16] added node for terraform v3 --- .github/workflows/ses-juntekim.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index 2281553..057117a 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -1,4 +1,4 @@ -name: Terraform SES (mist) +name: SES - juntekim.com [Simple Email Service] on: pull_request: @@ -28,6 +28,12 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 + - name: Install Node.js + run: | + sudo apt-get update + sudo apt-get install -y nodejs npm + + - name: Setup Terraform uses: hashicorp/setup-terraform@v3 with: From e89a3706c2a614e2a7c24d74efa0f92290c278f1 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 12:17:19 +0000 Subject: [PATCH 09/16] modern js --- .github/workflows/ses-juntekim.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index 057117a..95afc5a 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -28,11 +28,11 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Install Node.js + - name: Install modern Node.js run: | - sudo apt-get update - sudo apt-get install -y nodejs npm - + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo apt-get install -y nodejs + node --version - name: Setup Terraform uses: hashicorp/setup-terraform@v3 From c6f5176dbb225b9829e72b664e6c19290fe390e1 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 12:19:34 +0000 Subject: [PATCH 10/16] modern js --- aws_environment/ses-juntekim/backend.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aws_environment/ses-juntekim/backend.tf b/aws_environment/ses-juntekim/backend.tf index 3a76cf0..fa1dbb1 100644 --- a/aws_environment/ses-juntekim/backend.tf +++ b/aws_environment/ses-juntekim/backend.tf @@ -3,6 +3,7 @@ terraform { bucket = "juntekim-terraform-state" key = "ses/terraform.tfstate" region = "eu-west-2" - use_lockfile = true + dynamodb_table = "terraform-locks" + encrypt = true } -} \ No newline at end of file +} From a9b62b5bb61d72c8152a714b69a3722412f6d8a6 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:24:46 +0000 Subject: [PATCH 11/16] auto approve --- .devcontainer/devcontainer.json | 4 +++- .github/workflows/ses-juntekim.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2352c9c..aa711ce 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,7 +29,9 @@ "4ops.terraform", "fabiospampinato.vscode-todo-plus", "jgclark.vscode-todo-highlight", - "corentinartaud.pdfpreview" + "corentinartaud.pdfpreview", + "github.vscode-github-actions", + "genieai.chatgpt-vscode" ] } } diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index 95afc5a..c98b360 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -59,7 +59,7 @@ jobs: - name: Terraform Plan if: github.event_name == 'pull_request' working-directory: ${{ env.WORKING_DIR }} - run: terraform plan + run: terraform plan -input=false - name: Terraform Apply if: github.ref == 'refs/heads/main' From 1751db6b5184cf6eac00d6ff11b21d8b61e945c9 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:29:00 +0000 Subject: [PATCH 12/16] auto approve --- .github/workflows/ses-juntekim.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index c98b360..373d534 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -55,6 +55,11 @@ jobs: - name: Terraform Validate working-directory: ${{ env.WORKING_DIR }} run: terraform validate + + - name: Unlock + working-directory: ${{ env.WORKING_DIR }} + run: terraform force-unlock 0c6c287e-cfc5-ffa6-23c2-64b8b1197c19 + - name: Terraform Plan if: github.event_name == 'pull_request' From ab323132f7cfa0e233444f89fbbeca2b1250d059 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:41:42 +0000 Subject: [PATCH 13/16] added s3s juntekim to run again --- .devcontainer/Dockerfile | 17 ++++++++--------- .devcontainer/devcontainer.json | 3 +-- .github/workflows/ses-juntekim.yml | 5 ----- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 689de49..ad3cc80 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,8 @@ FROM library/python:3.12-bullseye # Personal access token 'mist _runner' ENV GITHUB_PAT=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 +ENV TERRAFORM_VERSION=1.6.6 + ARG USER=vscode ARG DEBIAN_FRONTEND=noninteractive @@ -37,15 +39,12 @@ RUN ./aws/install # Install terraform RUN apt-get update && sudo apt-get install -y gnupg software-properties-common -RUN wget -O- https://apt.releases.hashicorp.com/gpg | \ -gpg --dearmor | \ -sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null -RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ -https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ -tee /etc/apt/sources.list.d/hashicorp.list -RUN apt update -RUN apt-get install terraform -RUN terraform -install-autocomplete +RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ + && unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ + && mv terraform /usr/local/bin/terraform \ + && rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip + +RUN terraform version # Set the working directory diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index aa711ce..d42940f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -30,8 +30,7 @@ "fabiospampinato.vscode-todo-plus", "jgclark.vscode-todo-highlight", "corentinartaud.pdfpreview", - "github.vscode-github-actions", - "genieai.chatgpt-vscode" + "github.vscode-github-actions" ] } } diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index 373d534..244ded4 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -56,11 +56,6 @@ jobs: working-directory: ${{ env.WORKING_DIR }} run: terraform validate - - name: Unlock - working-directory: ${{ env.WORKING_DIR }} - run: terraform force-unlock 0c6c287e-cfc5-ffa6-23c2-64b8b1197c19 - - - name: Terraform Plan if: github.event_name == 'pull_request' working-directory: ${{ env.WORKING_DIR }} From b24e9b2bded4a237132e68f16c5c01ffb6832419 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:48:26 +0000 Subject: [PATCH 14/16] added file --- .github/workflows/ses-juntekim.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index 244ded4..ace06f0 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -59,9 +59,9 @@ jobs: - name: Terraform Plan if: github.event_name == 'pull_request' working-directory: ${{ env.WORKING_DIR }} - run: terraform plan -input=false + run: terraform plan -input=false -var-file=terraform.tfvars - name: Terraform Apply if: github.ref == 'refs/heads/main' working-directory: ${{ env.WORKING_DIR }} - run: terraform apply -auto-approve + run: terraform apply -auto-approve -input=false -var-file=terraform.tfvars From 22c767b8e9c93b79c0bbe27a4f5ea66592c88118 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:55:07 +0000 Subject: [PATCH 15/16] mis spelling of terraform --- .github/workflows/ses-juntekim.yml | 4 ++-- aws_environment/ses-juntekim/terrform.tfvars | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 aws_environment/ses-juntekim/terrform.tfvars diff --git a/.github/workflows/ses-juntekim.yml b/.github/workflows/ses-juntekim.yml index ace06f0..7359b04 100644 --- a/.github/workflows/ses-juntekim.yml +++ b/.github/workflows/ses-juntekim.yml @@ -59,9 +59,9 @@ jobs: - name: Terraform Plan if: github.event_name == 'pull_request' working-directory: ${{ env.WORKING_DIR }} - run: terraform plan -input=false -var-file=terraform.tfvars + run: terraform plan -input=false - name: Terraform Apply if: github.ref == 'refs/heads/main' working-directory: ${{ env.WORKING_DIR }} - run: terraform apply -auto-approve -input=false -var-file=terraform.tfvars + run: terraform apply -auto-approve -input=false diff --git a/aws_environment/ses-juntekim/terrform.tfvars b/aws_environment/ses-juntekim/terrform.tfvars deleted file mode 100644 index bb5eb1d..0000000 --- a/aws_environment/ses-juntekim/terrform.tfvars +++ /dev/null @@ -1 +0,0 @@ -email_domain = "juntekim.com" From 541b51b3f692665811610ddba69dccd63483becf Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 29 Dec 2025 13:56:48 +0000 Subject: [PATCH 16/16] add it then --- aws_environment/ses-juntekim/terraform.tfvars | 1 + 1 file changed, 1 insertion(+) create mode 100644 aws_environment/ses-juntekim/terraform.tfvars diff --git a/aws_environment/ses-juntekim/terraform.tfvars b/aws_environment/ses-juntekim/terraform.tfvars new file mode 100644 index 0000000..bb5eb1d --- /dev/null +++ b/aws_environment/ses-juntekim/terraform.tfvars @@ -0,0 +1 @@ +email_domain = "juntekim.com"