diff --git a/.infracost/pricing.gob b/.infracost/pricing.gob new file mode 100755 index 0000000..48a4553 Binary files /dev/null and b/.infracost/pricing.gob differ 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 0000000..7fa62ef Binary files /dev/null and b/terraform/.infracost/pricing.gob differ diff --git a/terraform/.infracost/terraform_modules/manifest.json b/terraform/.infracost/terraform_modules/manifest.json new file mode 100644 index 0000000..a8e3552 --- /dev/null +++ b/terraform/.infracost/terraform_modules/manifest.json @@ -0,0 +1 @@ +{"Path":".","Version":"2.0","Modules":[]} \ No newline at end of file