From 08b0afdf7437aba455f0b495abe8f3a351f85b8f Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sat, 29 Apr 2023 14:06:20 -0700 Subject: [PATCH] [CLOUDFLARE PAGES] kittywit.ch --- cloudflare-kittywit.ch.tf | 9 ------- cloudflare-kittywitch-pages.tf | 24 ++++++++++++++++++ main.go | 46 ---------------------------------- shells/repo.nix | 4 +-- systems/goliath.nix | 10 -------- systems/sumireko.nix | 10 -------- 6 files changed, 25 insertions(+), 78 deletions(-) create mode 100644 cloudflare-kittywitch-pages.tf delete mode 100644 main.go diff --git a/cloudflare-kittywit.ch.tf b/cloudflare-kittywit.ch.tf index 0722e0f1..b5d9cb63 100644 --- a/cloudflare-kittywit.ch.tf +++ b/cloudflare-kittywit.ch.tf @@ -61,15 +61,6 @@ resource "cloudflare_record" "terraform_managed_resource_1125359cc05a16a0950fd25 zone_id = "7e44e5503a0bba73d2025d0a9679205e" } -resource "cloudflare_record" "terraform_managed_resource_92ffaf7e0cfd9bb265a01448160abbf5" { - name = "kittywit.ch" - proxied = false - ttl = 3600 - type = "CNAME" - value = "yukari.gensokyo.zone" - zone_id = "7e44e5503a0bba73d2025d0a9679205e" -} - resource "cloudflare_record" "terraform_managed_resource_95d39eb707041e694c6b7f03cbae6b11" { name = "vault" proxied = false diff --git a/cloudflare-kittywitch-pages.tf b/cloudflare-kittywitch-pages.tf new file mode 100644 index 00000000..78b8a16e --- /dev/null +++ b/cloudflare-kittywitch-pages.tf @@ -0,0 +1,24 @@ +resource "cloudflare_pages_project" "kittywitch" { + account_id = "0467b993b65d8fd4a53fe24ed2fbb2a1" + name = "kittywitch" + production_branch = "main" + + source { + type = "github" + config { + owner = "kittywitch" + repo_name = "kittywit.ch" + production_branch = "main" + deployments_enabled = true + pr_comments_enabled = false + production_deployment_enabled = true + + } + } +} + +resource "cloudflare_pages_domain" "kittywitch_root" { + account_id = "0467b993b65d8fd4a53fe24ed2fbb2a1" + project_name = "kittywitch" + domain = "kittywit.ch" +} \ No newline at end of file diff --git a/main.go b/main.go deleted file mode 100644 index b53655e1..00000000 --- a/main.go +++ /dev/null @@ -1,46 +0,0 @@ -package main - -import ( - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "gopkg.in/yaml.v3" - "kittywitch/iac" - "os" -) - -func main() { - store := iac.KatConfig{} - - configFile, err := os.ReadFile("config.yaml") - - if err != nil { - return - } - - if err := yaml.Unmarshal(configFile, &store); err != nil { - return - } - - pulumi.Run(func(ctx *pulumi.Context) error { - for _, zone := range store.Zones { - err = zone.Handle(ctx) - if err != nil { - return err - } - if err != nil { - return err - } - } - for name, machine := range store.Machines { - err = machine.Handle(ctx, name) - if err != nil { - return err - } - } - - err = iac.InskipPage(ctx) - if err != nil { - return err - } - return err - }) -} diff --git a/shells/repo.nix b/shells/repo.nix index 2c767be1..e7a5aa41 100644 --- a/shells/repo.nix +++ b/shells/repo.nix @@ -12,10 +12,7 @@ with pkgs; let [ fd # fd, better fine! ripgrep # rg, better grep! - go # Required for pulumi - gopls sops - pulumi-bin # Infrastructure as code deadnix # dead-code scanner alejandra # code formatter statix # anti-pattern finder @@ -26,6 +23,7 @@ with pkgs; let '')) repo.darwinConfigurations); shellHook = '' + sops echo -e "\e[39m\e[1m$USER@$REPO_HOSTNAME - \e[35m''$(realpath --relative-to=../ ./nixos/)\e[0m" echo -e "\e[35mRunning alejandra\e[0m" alejandra -cq $(fd -e nix) diff --git a/systems/goliath.nix b/systems/goliath.nix index a11f1dfb..5cfd131e 100644 --- a/systems/goliath.nix +++ b/systems/goliath.nix @@ -25,16 +25,6 @@ _: let environment.systemPackages = with pkgs; [ fd # fd, better fine! ripgrep # rg, better grep! - go # Required for pulumi - gotools - go-outline - gocode - gopkgs - gocode-gomod - godef - golint - gopls - pulumi-bin # Infrastructure as code deadnix # dead-code scanner alejandra # code formatter statix # anti-pattern finder diff --git a/systems/sumireko.nix b/systems/sumireko.nix index 1a30b089..b21f01c5 100644 --- a/systems/sumireko.nix +++ b/systems/sumireko.nix @@ -16,16 +16,6 @@ _: let environment.systemPackages = with pkgs; [ fd # fd, better fine! ripgrep # rg, better grep! - go # Required for pulumi - gotools - go-outline - gocode - gopkgs - gocode-gomod - godef - golint - gopls - pulumi-bin # Infrastructure as code deadnix # dead-code scanner alejandra # code formatter statix # anti-pattern finder