diff --git a/README.md b/README.md index c00cfa1..2fec9ed 100644 --- a/README.md +++ b/README.md @@ -30,20 +30,20 @@ ## Workshop URL - Health Check: `GET: api/v1/health` - Group 1 - - Dev: [https://group-1-b1-dev.werockstar.dev/](https://group-1-b1-dev.werockstar.dev/) - - Prod: [https://group-1-b1-prod.werockstar.dev/](https://group-1-b1-prod.werockstar.dev/) + - Dev: [https://group-1-b2-dev.werockstar.dev/](https://group-1-b2-dev.werockstar.dev/) + - Prod: [https://group-1-b2-prod.werockstar.dev/](https://group-1-b2-prod.werockstar.dev/) - Group 2 - - Dev: [https://group-2-b1-dev.werockstar.dev/](https://group-2-b1-dev.werockstar.dev/) - - Prod: [https://group-2-b1-prod.werockstar.dev/](https://group-2-b1-prod.werockstar.dev/) + - Dev: [https://group-2-b2-dev.werockstar.dev/](https://group-2-b2-dev.werockstar.dev/) + - Prod: [https://group-2-b2-prod.werockstar.dev/](https://group-2-b2-prod.werockstar.dev/) - Group 3 - - Dev: [https://group-3-b1-dev.werockstar.dev/](https://group-3-b1-dev.werockstar.dev/) - - Prod: [https://group-3-b1-prod.werockstar.dev/](https://group-3-b1-prod.werockstar.dev/) + - Dev: [https://group-3-b2-dev.werockstar.dev/](https://group-3-b2-dev.werockstar.dev/) + - Prod: [https://group-3-b2-prod.werockstar.dev/](https://group-3-b2-prod.werockstar.dev/) - Group 4 - - Dev: [https://group-4-b1-dev.werockstar.dev/](https://group-4-b1-dev.werockstar.dev/) - - Prod: [https://group-4-b1-prod.werockstar.dev/](https://group-4-b1-prod.werockstar.dev/) + - Dev: [https://group-4-b2-dev.werockstar.dev/](https://group-4-b2-dev.werockstar.dev/) + - Prod: [https://group-4-b2-prod.werockstar.dev/](https://group-4-b2-prod.werockstar.dev/) - Group 5 - - Dev: [https://group-5-b1-dev.werockstar.dev/](https://group-5-b1-dev.werockstar.dev/) - - Prod: [https://group-5-b1-prod.werockstar.dev/](https://group-5-b1-prod.werockstar.dev/) + - Dev: [https://group-5-b2-dev.werockstar.dev/](https://group-5-b2-dev.werockstar.dev/) + - Prod: [https://group-5-b2-prod.werockstar.dev/](https://group-5-b2-prod.werockstar.dev/) # HongJot Diagram @@ -89,44 +89,25 @@ We have created the infrastructure by using Terraform. The infrastructure consis - Option 2: Set environment variable - `export AWS_ACCESS_KEY_ID=` - `export AWS_SECRET_ACCESS_KEY=` -- Create `ESK Cluster` - - `cd infra/iac/eks` +- Provision the infrastructure (ESK, RDS (Postgres), SonarQube, ArgoCD, Cloudflare, VPC) + - `cd infra/iac` - `terraform init` - `terraform apply` - - `Terraform` will require `Cloudflare` API key, you can get it from the `Cloudflare` dashboard - - Option 1: Enter API token on Terraform prompt - - Option 2: Export environment variable that provide for Terraform - - And then Terraform will proceed to create the EKS Cluster + - `Terraform` will require + - `cloudflare` API key, you can get it from the `Cloudflare` dashboard + - Option 1: Enter API token on Terraform prompt + - Option 2: Export environment variable that provide for Terraform + - `RDS` username, password, and database name + - Option 1: Enter the value on Terraform prompt + - Option 2: Export environment variable that provide for Terraform + - And then Terraform will do things for you - Waiting and enjoy your coffee -- Create `RDS (Postgres)` - - `cd infra/iac/rds` - - `terraform init` - - `terraform apply -auto-approve` - - You need to input username and password for the RDS - - Terraform will create the RDS - - And then output the RDS endpoint -- Create `SonarQube` - - `cd infra/iac/sonarqube` - - `terraform init` - - `terraform apply -auto-approve` - - You need to input `Cloudflare` API key - - Terraform will create the `SonarQube` - - And then output the SonarQube endpoint - - You can access default username and password via `infra/iac/sonar/ansible` - - Run `make get-cred` in Ansible directory -- Mapping DNS with `Cloudflare` - - We have created the DNS mapping for every group in the workshop such as: - - Dev - - `group-1-b1-dev`: `group-1-b1-dev.werockstar.dev` - - Prod - - `group-1-b1-prod`: `group-1-b1-prod.werockstar.dev` -- Create `ArgoCD` application (No need to do anything because we have done it for demo purpose) - - ArgoCD will automatically deploy the application to the EKS cluster -- Importantly, you need to destroy the infrastructure after the workshop - - `terraform destroy` in each directory +- 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-b1`) +- Fork `workshop-summer` repository and name it as `workshop-summer--` (e.g. `workshop-summer-group-1-b2`) - Enable Github Actions in the repository - Replace the `` pattern via `auto-replace-group.sh` - Setup project on `SonarQube` manually @@ -141,7 +122,7 @@ We have created the infrastructure by using Terraform. The infrastructure consis - Go to ArgoCD dashboard [https://argocd.werockstar.dev/](https://argocd.werockstar.dev/) - Setup GitOps āļŠāļģāļŦāļĢāļąāļš Development - āļāļ” `+ New App` āđāļĨāđ‰āļ§āđƒāļŠāđˆāļ‚āđ‰āļ­āļĄāļđāļĨāļ”āļąāļ‡āļ™āļĩāđ‰ - - Application Name: `--dev` (e.g. `group-1-b1-dev`) + - Application Name: `--dev` (e.g. `group-1-b2-dev`) - Project Name: `default` - SYNC POLICY: `Automatic` - Repository URL: `https://github.com//workshop-summer--` @@ -152,7 +133,7 @@ We have created the infrastructure by using Terraform. The infrastructure consis - āļ āļēāļ§āļ°āļ“āļē - Setup GitOps āļŠāļģāļŦāļĢāļąāļš Production env - āļāļ” `+ New App` āđāļĨāđ‰āļ§āđƒāļŠāđˆāļ‚āđ‰āļ­āļĄāļđāļĨāļ”āļąāļ‡āļ™āļĩāđ‰ - - Application Name: `--prod` (e.g. `group-1-b1-prod`) + - Application Name: `--prod` (e.g. `group-1-b2-prod`) - Project Name: `default` - SYNC POLICY: `Automatic` - Repository URL: `https://github.com//workshop-summer--` 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 55ad249..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 @@ -37,6 +39,7 @@ No providers. | [eks](#module\_eks) | ./eks | n/a | | [rds](#module\_rds) | ./rds | n/a | | [sonarqube](#module\_sonarqube) | ./sonarqube | n/a | +| [vpc](#module\_vpc) | ./vpc | n/a | ## Resources diff --git a/infra/iac/argocd-app/README.md b/infra/iac/argocd-app/README.md index 1ff20c7..e7a4678 100644 --- a/infra/iac/argocd-app/README.md +++ b/infra/iac/argocd-app/README.md @@ -24,8 +24,8 @@ This module intended to create ArgoCD application for EKS cluster | Name | Version | |------|---------| -| [argocd](#provider\_argocd) | 6.1.1 | -| [aws](#provider\_aws) | 5.47.0 | +| [argocd](#provider\_argocd) | >= 6.0.0, < 7.0.0 | +| [aws](#provider\_aws) | ~> 5.0 | ## Modules @@ -47,6 +47,7 @@ No modules. | [argocd\_password](#input\_argocd\_password) | ArgoCD password | `string` | n/a | yes | | [argocd\_server\_addr](#input\_argocd\_server\_addr) | ArgoCD server address | `string` | `"argocd.werockstar.dev:443"` | no | | [argocd\_username](#input\_argocd\_username) | ArgoCD username | `string` | `"admin"` | no | +| [batch\_no](#input\_batch\_no) | Workshop batch number | `string` | `"b2"` | no | | [cluster\_name](#input\_cluster\_name) | The name of the EKS cluster | `string` | `"eks-go-workshop"` | no | ## Outputs diff --git a/infra/iac/eks/README.md b/infra/iac/eks/README.md index 908f1e9..12c7746 100644 --- a/infra/iac/eks/README.md +++ b/infra/iac/eks/README.md @@ -80,9 +80,9 @@ data: | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.48.0 | +| [aws](#provider\_aws) | ~> 5.48.0 | | [cloudflare](#provider\_cloudflare) | 4.31.0 | -| [helm](#provider\_helm) | 2.13.1 | +| [helm](#provider\_helm) | ~> 2.13 | | [kubernetes](#provider\_kubernetes) | 2.29.0 | ## Modules @@ -93,7 +93,6 @@ No modules. | Name | Type | |------|------| -| [aws_eip.nat](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource | | [aws_eks_cluster.eks-cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster) | resource | | [aws_eks_node_group.private-nodes](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group) | resource | | [aws_iam_role.eks_iam](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | @@ -102,19 +101,6 @@ No modules. | [aws_iam_role_policy_attachment.nodes-AmazonEC2ContainerRegistryReadOnly](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.nodes-AmazonEKSWorkerNodePolicy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.nodes-AmazonEKS_CNI_Policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | 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.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_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.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_vpc.workshop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc) | resource | | [cloudflare_record.argocd](https://registry.terraform.io/providers/cloudflare/cloudflare/4.31.0/docs/resources/record) | resource | | [cloudflare_record.cnames-dev](https://registry.terraform.io/providers/cloudflare/cloudflare/4.31.0/docs/resources/record) | resource | | [cloudflare_record.cnames-prod](https://registry.terraform.io/providers/cloudflare/cloudflare/4.31.0/docs/resources/record) | resource | @@ -130,14 +116,26 @@ No modules. |------|-------------|------|---------|:--------:| | [argocd\_namespace](#input\_argocd\_namespace) | The namespace where ArgoCD is installed | `string` | `"argocd"` | no | | [batch\_no](#input\_batch\_no) | Workshop batch number | `string` | `"b2"` | no | +| [capacity\_type](#input\_capacity\_type) | The capacity type for the EKS nodes | `string` | n/a | yes | | [cloudflare\_api\_token](#input\_cloudflare\_api\_token) | Cloudflare API Token | `string` | n/a | yes | -| [cluster\_name](#input\_cluster\_name) | The name of the EKS cluster | `string` | `"eks-go-workshop"` | no | +| [cluster\_name](#input\_cluster\_name) | The name of the EKS cluster | `string` | n/a | yes | +| [desired\_size](#input\_desired\_size) | The desired size of the EKS nodes | `number` | n/a | yes | | [eks\_node\_role](#input\_eks\_node\_role) | The IAM role for the EKS nodes | `string` | `"eks-nodes-role"` | no | | [eks\_role](#input\_eks\_role) | The IAM role for the EKS cluster | `string` | `"eks-go-workshop-role"` | no | +| [igw\_id](#input\_igw\_id) | The ID of the Internet Gateway | `string` | n/a | yes | | [ingress\_namespace](#input\_ingress\_namespace) | The namespace where the Ingress Controller is installed | `string` | `"ingress-nginx"` | no | -| [nat\_name](#input\_nat\_name) | The name of the NAT Gateway | `string` | `"go-workshop-nat"` | no | -| [subdomains](#input\_subdomains) | List of subdomains | `list(string)` |
[
"group-0",
"group-1",
"group-2",
"group-3",
"group-4",
"group-5"
]
| no | -| [vpc\_name](#input\_vpc\_name) | The name of the VPC | `string` | `"go-workshop-vpc"` | no | +| [instance\_type](#input\_instance\_type) | The instance type for the EKS nodes | `string` | n/a | yes | +| [max\_size](#input\_max\_size) | The maximum size of the EKS nodes | `number` | n/a | yes | +| [min\_size](#input\_min\_size) | The minimum size of the EKS nodes | `number` | n/a | yes | +| [nat\_id](#input\_nat\_id) | ID of the NAT Gateway | `string` | n/a | yes | +| [subdomains](#input\_subdomains) | List of subdomains | `list(string)` | n/a | yes | +| [subnet\_private-1a](#input\_subnet\_private-1a) | ID of the private subnet in AZ 1a | `string` | n/a | yes | +| [subnet\_private-1b](#input\_subnet\_private-1b) | ID of the private subnet in AZ 1b | `string` | n/a | yes | +| [subnet\_private-1c](#input\_subnet\_private-1c) | ID of the private subnet in AZ 1c | `string` | n/a | yes | +| [subnet\_public-1a](#input\_subnet\_public-1a) | ID of the public subnet in AZ 1a | `string` | n/a | yes | +| [subnet\_public-1b](#input\_subnet\_public-1b) | ID of the public subnet in AZ 1b | `string` | n/a | yes | +| [subnet\_public-1c](#input\_subnet\_public-1c) | ID of the public subnet in AZ 1c | `string` | n/a | yes | +| [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes | | [zone\_id](#input\_zone\_id) | Cloudflare Zone ID | `string` | `"460c65b55ec2a251ab45cf8eedac4734"` | no | ## Outputs diff --git a/infra/iac/main.tf b/infra/iac/main.tf index 8db3974..c97e079 100644 --- a/infra/iac/main.tf +++ b/infra/iac/main.tf @@ -36,7 +36,7 @@ module "rds" { source = "./rds" db_password = var.rds_db_password db_username = var.rds_db_username - db_name = "workshop" + db_name = var.rds_db_name rds_vpc_id = module.vpc.vpc_id rds_subnet_public-1a = module.vpc.subnet_public-1a rds_subnet_public-1b = module.vpc.subnet_public-1b diff --git a/infra/iac/provides.tf b/infra/iac/provides.tf new file mode 100644 index 0000000..104ed4a --- /dev/null +++ b/infra/iac/provides.tf @@ -0,0 +1,3 @@ +terraform { + required_version = "~> 1.8.0" +} diff --git a/infra/iac/rds/README.md b/infra/iac/rds/README.md index 8ad4315..6022ad5 100644 --- a/infra/iac/rds/README.md +++ b/infra/iac/rds/README.md @@ -10,7 +10,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.48.0 | +| [aws](#provider\_aws) | ~> 5.0 | ## Modules @@ -21,16 +21,21 @@ No modules. | Name | Type | |------|------| | [aws_db_instance.postgres](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance) | resource | +| [aws_db_subnet_group.db_subnet_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_subnet_group) | resource | | [aws_security_group.db-sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | -| [aws_vpc.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [db\_name](#input\_db\_name) | database name | `string` | `"workshop"` | no | +| [db\_name](#input\_db\_name) | database name | `string` | n/a | yes | | [db\_password](#input\_db\_password) | password for db | `string` | n/a | yes | | [db\_username](#input\_db\_username) | username for db | `string` | n/a | yes | +| [publicly\_accessible](#input\_publicly\_accessible) | Whether the RDS instance is publicly accessible | `bool` | n/a | yes | +| [rds\_subnet\_public-1a](#input\_rds\_subnet\_public-1a) | ID of the public subnet in AZ 1a | `string` | n/a | yes | +| [rds\_subnet\_public-1b](#input\_rds\_subnet\_public-1b) | ID of the public subnet in AZ 1b | `string` | n/a | yes | +| [rds\_subnet\_public-1c](#input\_rds\_subnet\_public-1c) | ID of the public subnet in AZ 1c | `string` | n/a | yes | +| [rds\_vpc\_id](#input\_rds\_vpc\_id) | ID of the VPC | `string` | n/a | yes | ## Outputs @@ -39,4 +44,4 @@ No modules. | [database\_endpoint](#output\_database\_endpoint) | n/a | | [database\_name](#output\_database\_name) | n/a | | [database\_port](#output\_database\_port) | n/a | - \ No newline at end of file + diff --git a/infra/iac/sonarqube/README.md b/infra/iac/sonarqube/README.md index 3758ed2..59ad0b6 100644 --- a/infra/iac/sonarqube/README.md +++ b/infra/iac/sonarqube/README.md @@ -20,9 +20,9 @@ sudo cat /home/bitnami/bitnami_credentials | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.47.0 | -| [cloudflare](#provider\_cloudflare) | 4.30.0 | -| [local](#provider\_local) | 2.5.1 | +| [aws](#provider\_aws) | ~> 5.0 | +| [cloudflare](#provider\_cloudflare) | >= 4.0.0, < 5.0.0 | +| [local](#provider\_local) | >= 2.0.0 | ## Modules @@ -49,6 +49,7 @@ No modules. |------|-------------|------|---------|:--------:| | [cloudflare\_api\_token](#input\_cloudflare\_api\_token) | Cloudflare API Token | `string` | n/a | yes | | [instance\_name](#input\_instance\_name) | Name of the instance | `string` | `"sonarqube"` | no | +| [instance\_type](#input\_instance\_type) | Instance type | `string` | n/a | yes | | [zone\_id](#input\_zone\_id) | Cloudflare Zone ID | `string` | `"460c65b55ec2a251ab45cf8eedac4734"` | no | ## Outputs diff --git a/infra/iac/variables.tf b/infra/iac/variables.tf index 9339d57..31a5eab 100644 --- a/infra/iac/variables.tf +++ b/infra/iac/variables.tf @@ -36,6 +36,5 @@ variable "rds_db_username" { variable "rds_db_name" { type = string - default = "workshop" - description = "database name" + description = "initial database name" } 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 | +