diff --git a/README.md b/README.md index bd3b4bc..2fec9ed 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,7 @@ We have created the infrastructure by using Terraform. The infrastructure consis - Waiting and enjoy your coffee - Importantly, you need to destroy resources because it's not free 💰 - `terraform destroy` +- **Note**: You can see the [README.md](infra/iac/README.md) in the `infra` directory for more information ### Step 1: Fork the repository and setup Github Actions ✅ - Fork `workshop-summer` repository and name it as `workshop-summer--` (e.g. `workshop-summer-group-1-b2`) diff --git a/infra/README.md b/infra/README.md index 8eceafd..6db0e04 100644 --- a/infra/README.md +++ b/infra/README.md @@ -1,31 +1,6 @@ # GitOps and Infrastructure as Code - [GitOps](gitops) - `ArgoCD` will sync the configuration from here - - [dev](gitops/dev) - Dev environment - - [prod](gitops/prod) - Prod environment + - [dev](gitops/dev) - `K8s` configuration for Dev environment + - [prod](gitops/prod) - `K8s` configuration for Prod environment + - **Secrets** - `K8s` secret, we've applied in `K8s` cluster - [IaC](iac/README.md) - Use `Terraform` code for describe how infrastructure look like - - -## Requirements - -No requirements. - -## Providers - -No providers. - -## Modules - -No modules. - -## Resources - -No resources. - -## Inputs - -No inputs. - -## Outputs - -No outputs. - diff --git a/infra/iac/README.md b/infra/iac/README.md index f18f33c..40cb8ab 100644 --- a/infra/iac/README.md +++ b/infra/iac/README.md @@ -1,25 +1,27 @@ # Infrastructure as Code -- [EKS](eks/README.md) - Create EKS cluster, ArgoCD, nginx ingress controller and external-dns +- [EKS](eks/README.md) - Create EKS cluster, Install ArgoCD, nginx ingress controller and external-dns - [ArgoCD](argocd-app/README.md) - Create ArgoCD applications - [SonarQube](sonarqube/README.md) - Create SonarQube server and mapping DNS to SonarQube - DNS `sonarqube`: `sonarqube.werockstar.dev` - We're still create project in SonarQube manually -- [Cloudflare](cloudflare/README.md) - Create Cloudflare DNS record for all group +- [RDS](rds/README.md) - Create RDS PostgreSQL database +- [VPC](vpc/README.md) - Create VPC, Subnets, Route Table, Internet Gateway, NAT Gateway, etc. +- Create Cloudflare all record for all group (Implemented in `eks` module) - Dev - - `group-1-b1-dev`: `group-1-b1-dev.werockstar.dev` - - `group-2-b1-dev`: `group-2-b1-dev.werockstar.dev` - - `group-3-b1-dev`: `group-3-b1-dev.werockstar.dev` - - `group-4-b1-dev`: `group-4-b1-dev.werockstar.dev` - - `group-5-b1-dev`: `group-5-b1-dev.werockstar.dev` + - `group-1-b2-dev`: `group-1-b2-dev.werockstar.dev` + - `group-2-b2-dev`: `group-2-b2-dev.werockstar.dev` + - `group-3-b2-dev`: `group-3-b2-dev.werockstar.dev` + - `group-4-b2-dev`: `group-4-b2-dev.werockstar.dev` + - `group-5-b2-dev`: `group-5-b2-dev.werockstar.dev` - Prod - - `group-1-b1-prod`: `group-1-b1-prod.werockstar.dev` - - `group-2-b1-prod`: `group-2-b1-prod.werockstar.dev` - - `group-3-b1-prod`: `group-3-b1-prod.werockstar.dev` - - `group-4-b1-prod`: `group-4-b1-prod.werockstar.dev` - - `group-5-b1-prod`: `group-5-b1-prod.werockstar.dev` + - `group-1-b2-prod`: `group-1-b2-prod.werockstar.dev` + - `group-2-b2-prod`: `group-2-b2-prod.werockstar.dev` + - `group-3-b2-prod`: `group-3-b2-prod.werockstar.dev` + - `group-4-b2-prod`: `group-4-b2-prod.werockstar.dev` + - `group-5-b2-prod`: `group-5-b2-prod.werockstar.dev` - `group-0` is reserved for instructor - - `group-0-b1-dev`: `group-0-b1-dev.werockstar.dev` - - `group-0-b1-prod`: `group-0-b1-prod.werockstar.dev` + - `group-0-b2-dev`: `group-0-b2-dev.werockstar.dev` + - `group-0-b2-prod`: `group-0-b2-prod.werockstar.dev` ## Requirements diff --git a/infra/iac/vpc/README.md b/infra/iac/vpc/README.md new file mode 100644 index 0000000..c2f809f --- /dev/null +++ b/infra/iac/vpc/README.md @@ -0,0 +1,63 @@ + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | ~> 1.8.0 | +| [aws](#requirement\_aws) | ~> 5.48.0 | + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | ~> 5.48.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [aws_eip.nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource | +| [aws_internet_gateway.igw](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway) | resource | +| [aws_nat_gateway.nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/nat_gateway) | resource | +| [aws_route_table.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource | +| [aws_route_table.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table) | resource | +| [aws_route_table_association.private-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_route_table_association.private-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_route_table_association.private-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_route_table_association.public-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_route_table_association.public-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_route_table_association.public-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association) | resource | +| [aws_subnet.private-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_subnet.private-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_subnet.private-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_subnet.public-1a](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_subnet.public-1b](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_subnet.public-1c](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource | +| [aws_vpc.vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [cluster\_name](#input\_cluster\_name) | The name of cluster | `string` | n/a | yes | +| [nat\_name](#input\_nat\_name) | The name of the NAT Gateway | `string` | `"go-workshop-nat"` | no | +| [vpc\_name](#input\_vpc\_name) | The name of VPC | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [igw\_id](#output\_igw\_id) | n/a | +| [nat\_id](#output\_nat\_id) | n/a | +| [subnet\_private-1a](#output\_subnet\_private-1a) | n/a | +| [subnet\_private-1b](#output\_subnet\_private-1b) | n/a | +| [subnet\_private-1c](#output\_subnet\_private-1c) | n/a | +| [subnet\_public-1a](#output\_subnet\_public-1a) | n/a | +| [subnet\_public-1b](#output\_subnet\_public-1b) | n/a | +| [subnet\_public-1c](#output\_subnet\_public-1c) | n/a | +| [vpc\_id](#output\_vpc\_id) | n/a | +