✨ playing with terraform
This commit is contained in:
parent
6198ed9d59
commit
e66a4b9a37
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@
|
||||
/result
|
||||
/.pre-commit-config.yaml
|
||||
/node_modules/
|
||||
.terraform
|
||||
*.tfvars
|
||||
*.tfstate
|
54
flake.lock
generated
54
flake.lock
generated
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690431538,
|
||||
"narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=",
|
||||
"lastModified": 1692248770,
|
||||
"narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "16c07487ac9bc59f58b121d13160c67befa3342e",
|
||||
"rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -59,11 +59,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690407224,
|
||||
"narHash": "sha256-pmgl0SZ6dXMXBJXykyoCiK4niLfIghhV566V14BMctI=",
|
||||
"lastModified": 1691184165,
|
||||
"narHash": "sha256-Bi3PQcQ3/wxfeyrwmqSJ7MWFLRTqOtn7U8JpqoQC0MA=",
|
||||
"owner": "walkah",
|
||||
"repo": "dotfiles",
|
||||
"rev": "fcaf64f19fd4d53bed05104ed42717ea0a8e35f9",
|
||||
"rev": "c122f90a783c01e84c5ea25cbb181a87df3ea2cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -216,11 +216,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690476848,
|
||||
"narHash": "sha256-PSmzyuEbMxEn2uwwLYUN2l1psoJXb7jm/kfHD12Sq0k=",
|
||||
"lastModified": 1692503956,
|
||||
"narHash": "sha256-MOA6FKc1YgfGP3ESnjSYfsyJ1BXlwV5pGlY/u5XdJfY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8d243f7da13d6ee32f722a3f1afeced150b6d4da",
|
||||
"rev": "958c06303f43cf0625694326b7f7e5475b1a2d5c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -267,11 +267,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1690200740,
|
||||
"narHash": "sha256-aRkEXGmCbAGcvDcdh/HB3YN+EvoPoxmJMOaqRZmf6vM=",
|
||||
"lastModified": 1692373088,
|
||||
"narHash": "sha256-EPgCecdc9I8aTdmDNoO1l7R72r2WPhZRcesV4nzxBj8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "ba9650b14e83b365fb9e731f7d7c803f22d2aecf",
|
||||
"rev": "7f1836531b126cfcf584e7d7d71bf8758bb58969",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -283,11 +283,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690031011,
|
||||
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
|
||||
"lastModified": 1692447944,
|
||||
"narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "12303c652b881435065a98729eb7278313041e49",
|
||||
"rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -315,11 +315,11 @@
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1690066826,
|
||||
"narHash": "sha256-6L2qb+Zc0BFkh72OS9uuX637gniOjzU6qCDBpjB2LGY=",
|
||||
"lastModified": 1692492726,
|
||||
"narHash": "sha256-rld5qm2B4oRkDwcPD+yOSyTrZQdfCR6mzJGGkecjvTs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ce45b591975d070044ca24e3003c830d26fea1c8",
|
||||
"rev": "5e63e8bbc46bc4fc22254da1edaf42fc7549c18a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -331,11 +331,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1690441914,
|
||||
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
|
||||
"lastModified": 1692494774,
|
||||
"narHash": "sha256-noGVoOTyZ2Kr5OFglzKYOX48cx3hggdCPbXrYMG2FDw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "db8672b8d0a2593c2405aed0c1dfa64b2a2f428f",
|
||||
"rev": "3476a10478587dec90acb14ec6bde0966c545cc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -356,11 +356,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690464206,
|
||||
"narHash": "sha256-38V4kmOh6ikpfGiAS+Kt2H/TA2DubSqE66veP/jmB4Q=",
|
||||
"lastModified": 1692274144,
|
||||
"narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "9289996dcac62fd45836db7c07b87d2521eb526d",
|
||||
"rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -393,11 +393,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690199016,
|
||||
"narHash": "sha256-yTLL72q6aqGmzHq+C3rDp3rIjno7EJZkFLof6Ika7cE=",
|
||||
"lastModified": 1692500916,
|
||||
"narHash": "sha256-iKADqEOHmyi+LCJ5LzWcM2zH0DP3WHFETjX98blH0tE=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "c36df4fe4bf4bb87759b1891cab21e7a05219500",
|
||||
"rev": "4f0f113b7dbcb92edb9c901515fcab0b91c6def7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -13,10 +13,12 @@ in
|
||||
darwin-local
|
||||
deploy-rs.deploy-rs
|
||||
deadnix
|
||||
doctl
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
statix
|
||||
sops
|
||||
terraform
|
||||
];
|
||||
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
|
26
terraform/.terraform.lock.hcl
generated
Normal file
26
terraform/.terraform.lock.hcl
generated
Normal file
@ -0,0 +1,26 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/digitalocean/digitalocean" {
|
||||
version = "2.29.0"
|
||||
constraints = "~> 2.0"
|
||||
hashes = [
|
||||
"h1:mJrr4YaOsB7bWfCSJZneiXB6JMnVNnFxYRmQ8vKaOSQ=",
|
||||
"zh:0af0a1a2de818c5dc8ee7ad4dc4731452848e84cfa0c1ce514af1c7aad15c53c",
|
||||
"zh:27229f3162b4142be48554f56227265982f3b74e4c79fa5d2528c8a3912d1e19",
|
||||
"zh:31d6e73bfe12231fa0ab3bbeef0e4aa9822a2008ae2a1a8b22557bdada4af7a3",
|
||||
"zh:6e7417413e96b87a11d47e9acbc88e6d707a6ab23a7de6b584fc600d9d3cbf00",
|
||||
"zh:9faf40798a698b80e8d56e502c220856d2d5f55d5137b9cf5371f2fdaeadd70a",
|
||||
"zh:b9ab9caf21b3f928fdd891e749fd8d33f6d441b39a08d725edf58cf8027a9b7b",
|
||||
"zh:be32b3a35474f8acbab4d0ad8676810fa05a87918cc1874b53672159005016c0",
|
||||
"zh:c2e8f7c08cad44b46e2e5580183e1ef2a4f1803347de136d1a35f333973a25f0",
|
||||
"zh:cf0aba5b5042c762da489050716815652f809f3ef0ededb0f981f11691dbef03",
|
||||
"zh:d1c0874c0ae0aa1eae86dbd131978796303599709c35b5dee926887d375f4cc8",
|
||||
"zh:d4eecb61e763950a5a0f40cddc7a58345419a522b783aae7b0703309a354bb0c",
|
||||
"zh:d866df86dd78eb2a9e54ebff637301522766710bb6dc7f8e330f1146822b62ee",
|
||||
"zh:da51541ef96d0a5745740dc623bff3ccfb6b098b548d78cf5e9d95a15c69963a",
|
||||
"zh:ede343be1528b468feae3a1cbf781e223f63ce33446a008a42f2fb799a23b436",
|
||||
"zh:f20a60e2cecd29bbcc73d59e95aca368e2c55b7648f1923df2c0f7578026b048",
|
||||
"zh:fccaf963f2db1e271e9d28276172910ca6b95471b8e0dfac758daf0495ce17f5",
|
||||
]
|
||||
}
|
9
terraform/droplets.tf
Normal file
9
terraform/droplets.tf
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
resource "digitalocean_droplet" "socrates" {
|
||||
name = "socrates"
|
||||
image = "72067660"
|
||||
size = "s-8vcpu-16gb"
|
||||
backups = true
|
||||
ipv6 = true
|
||||
monitoring = true
|
||||
}
|
16
terraform/main.tf
Normal file
16
terraform/main.tf
Normal file
@ -0,0 +1,16 @@
|
||||
terraform {
|
||||
required_version = ">= 1.3.0"
|
||||
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "do_token" {}
|
||||
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
}
|
Loading…
Reference in New Issue
Block a user