From b89092cc0738fede6f0ba9fe3140548c731f16c4 Mon Sep 17 00:00:00 2001 From: witch Date: Fri, 11 Jul 2025 13:24:59 -0700 Subject: [PATCH] Scaffolding for lab 5, add infracost --- .infracost/pricing.gob | Bin 0 -> 1586 bytes ...fest-1b1ed905d54c18e3dd8828986c14be17.json | 1 + lab-5/README.md | 25 ++++++++++++++++++ lab-5/main.tf | 1 + mise.toml | 6 +++++ terraform/.infracost/pricing.gob | Bin 0 -> 1586 bytes .../terraform_modules/manifest.json | 1 + 7 files changed, 34 insertions(+) create mode 100755 .infracost/pricing.gob create mode 100644 .infracost/terraform_modules/manifest-1b1ed905d54c18e3dd8828986c14be17.json create mode 100644 lab-5/README.md create mode 100644 lab-5/main.tf create mode 100755 terraform/.infracost/pricing.gob create mode 100644 terraform/.infracost/terraform_modules/manifest.json diff --git a/.infracost/pricing.gob b/.infracost/pricing.gob new file mode 100755 index 0000000000000000000000000000000000000000..48a45533f76ce35f15b19a6264426cf2f7f1ea9c GIT binary patch literal 1586 zcmbW1J8M)y6vyvuc9SS#0v3W;$VIGNnfD`L5l~PR5u+e^6!XLdqanM&NC+k|#vm4c z0B!sRB8p%kR+bh)8wIUQp%RdQL1fpnD~1H3xVclz4EJ!(e}3mb)6=+JM1{s;hB{GW zCd&@p=z#4^h6NR_l}cDh9akgjJ zhy*V7(FjF2XDKqAoUsG|g-~|HMy4eRUZ_ZeqeLaEnN^&E&G{y0WBSM0_2T=jl#dc&okkx#T2;;i9%FS+IH1kw$K9A`H{io>JUuU<+#L(`Knpx|>d0?O(e8 zY~{<+cBC2u2m=nDS!=9ePJ}3h)Ef9H!*m(kXSC8dC?_M6k`pH=m?de#g_oP45+c{B zc7EGR>fX=Q`NezLsg~5a_Na1U93uczF-nOBr@{+jBxYCy30JzEmyN9J?5b~}^B0r4 B;b{N> literal 0 HcmV?d00001 diff --git a/.infracost/terraform_modules/manifest-1b1ed905d54c18e3dd8828986c14be17.json b/.infracost/terraform_modules/manifest-1b1ed905d54c18e3dd8828986c14be17.json new file mode 100644 index 0000000..9a05535 --- /dev/null +++ b/.infracost/terraform_modules/manifest-1b1ed905d54c18e3dd8828986c14be17.json @@ -0,0 +1 @@ +{"Path":"terraform","Version":"2.0","Modules":[]} \ No newline at end of file diff --git a/lab-5/README.md b/lab-5/README.md new file mode 100644 index 0000000..0b7cf10 --- /dev/null +++ b/lab-5/README.md @@ -0,0 +1,25 @@ +# Lab 5 + +Build an RDS Database (MySQL) within VPC + +## Tasks + +- [ ] Using Terraform, provision a private RDS MySQL 8.0 instance in the same VPC. +Restrict access so only your EC2 (from Month 1) can connect on port 3306. + +## Map + +```mermaid +``` + +## Resources + +- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc +- https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html +- [An Introduction to Networking Terminology, Interfaces, and Protocols](https://www.digitalocean.com/community/tutorials/an-introduction-to-networking-terminology-interfaces-and-protocols) +- [Understanding IP Addresses, Subnets, and CIDR Notation for Networking](https://www.digitalocean.com/community/tutorials/understanding-ip-addresses-subnets-and-cidr-notation-for-networking) + +## Terms + +- **CIDR blocks**: +- **IPv4 and IPv6**: \ No newline at end of file diff --git a/lab-5/main.tf b/lab-5/main.tf new file mode 100644 index 0000000..bafa8dc --- /dev/null +++ b/lab-5/main.tf @@ -0,0 +1 @@ +resource "aws_vpc" "lab5_vpc" \ No newline at end of file diff --git a/mise.toml b/mise.toml index 168f044..c11424f 100644 --- a/mise.toml +++ b/mise.toml @@ -2,6 +2,7 @@ aws-cli = 'latest' pandoc = 'latest' terraform = 'latest' +infracost = 'latest' # Also required: # - bitwarden CLI @@ -30,3 +31,8 @@ aws ec2 stop-instances --instance-ids $TF_VAR_EC2_INSTANCE_ID --region us-east-2 run = """ aws ec2 start-instances --instance-ids $TF_VAR_EC2_INSTANCE_ID --region us-east-2 """ + +[tasks.costs] +run = """ +infracost breakdown --path . +""" diff --git a/terraform/.infracost/pricing.gob b/terraform/.infracost/pricing.gob new file mode 100755 index 0000000000000000000000000000000000000000..7fa62efcd818daec7fe3fb78cbf917a561185b54 GIT binary patch literal 1586 zcmbW1Icrrx6oBu%C5cf~P!L2!ZegQOXI}z>0fmTS;R2$jIJ05I#E|zwA|aS)TnY<+ zfHqcI3nEyEm8C_{#>URVwGa#Is-Y z8`65RHCC?2$A?i*hU!N~e3)#X=q`7miHf8b3;Lu1)KbNHw+2-O#9i@~* z!{K+u#rn-e*}X9P@>5Nj2QLunMa7q?+(QfUzNvh4?6Mzst!CbLt{n`yuw**`%?o*7 zE^P$IvCx()@YD&WoZ-v`s=4+7H#is{Ju_0o=qy+zG#3H90;;0tD&L!*K6xl*;-R7P z>A~r}tJk6!lPF0f5;zMyXcrmbQAB4jb+q$ZgVWR1#rnn!Z9+-f#&@+R7uP?cUl-43 z3*Y9qA9!{D{Nqx}TxU`o!$w46gbPL}!a0k9;b;wzB*^=QB@mdF#5m4M45+{*<&5dna0fC5z=ko9k}d@$e<&BxKU2DASDW+w>-Wd{-{`k%nbJTs zHdYu=Dq