From a2100beb362b319d1940d5459aed8730f4a4e66a Mon Sep 17 00:00:00 2001 From: Sourav Kundu Date: Mon, 1 Jan 2024 16:45:53 -0600 Subject: [PATCH 1/2] update provider version #28 --- .github/workflows/terraform.yml | 2 +- provider.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 2db04cb..db42482 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -87,7 +87,7 @@ jobs: # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc. - name: Terraform Init id: init - run: terraform init + run: terraform init -upgrade # Checks that all Terraform configuration files adhere to a canonical format - name: Terraform Format diff --git a/provider.tf b/provider.tf index 4cf6744..453f56a 100644 --- a/provider.tf +++ b/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "4.20.1" + version = "5.31.0" } } } From dda6d3d45e6588114521a63bb8e0804426034f12 Mon Sep 17 00:00:00 2001 From: Sourav Kundu Date: Mon, 1 Jan 2024 16:54:21 -0600 Subject: [PATCH 2/2] Added badges for #27 --- ReadMe.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index ad73ddf..f83efa7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,3 +1,5 @@ +[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-white.svg)](https://choosealicense.com/licenses/unlicense/)[![GitHub pull-requests closed](https://img.shields.io/github/issues-pr-closed/kunduso/add-aws-elb-ec2-terraform)](https://github.com/kunduso/add-aws-elb-ec2-terraform/pulls?q=is%3Apr+is%3Aclosed)[![GitHub pull-requests](https://img.shields.io/github/issues-pr/kunduso/add-aws-elb-ec2-terraform)](https://GitHub.com/kunduso/add-aws-elb-ec2-terraform/pull/) +[![GitHub issues-closed](https://img.shields.io/github/issues-closed/kunduso/add-aws-elb-ec2-terraform)](https://github.com/kunduso/add-aws-elb-ec2-terraform/issues?q=is%3Aissue+is%3Aclosed)[![GitHub issues](https://img.shields.io/github/issues/kunduso/add-aws-elb-ec2-terraform)](https://GitHub.com/kunduso/add-aws-elb-ec2-terraform/issues/) [![terraform-infra-provisioning](https://github.com/kunduso/add-aws-elb-ec2-terraform/actions/workflows/terraform.yml/badge.svg)](https://github.com/kunduso/add-aws-elb-ec2-terraform/actions/workflows/terraform.yml) [![checkov-static-analysis-scan](https://github.com/kunduso/add-aws-elb-ec2-terraform/actions/workflows/code-scan.yml/badge.svg?branch=main)](https://github.com/kunduso/add-aws-elb-ec2-terraform/actions/workflows/code-scan.yml) [![infracost](https://img.shields.io/endpoint?url=https://dashboard.api.infracost.io/shields/json/06af6e89-01e0-4bb5-bf85-ea19a0d3327a/repos/d7b4f62a-ed9e-4c0e-86f1-0ef3eb090cfb/branch/e9ba2997-4ca7-4a8e-9db5-8cde6e98f7fa)](https://dashboard.infracost.io/org/skundudev/repos/d7b4f62a-ed9e-4c0e-86f1-0ef3eb090cfb?tab=settings) @@ -5,9 +7,9 @@ ## Motivation My objectives was to create an application load balancer and attach that to three Amazon EC2 instances hosted in three different availability zones in a region using **Terraform and GitHub Actions.** -
I discussed the concept and the code in detail in my notes at -[add an application load balancer to Amazon EC2 using Terraform.](https://skundunotes.com/2022/07/30/add-an-application-load-balancer-to-aws-ec2-using-terraform/) -
Later, I also automated the process of provisioning the resources using GitHub Actions pipeline and I discussed that in detail at -[CI-CD with Terraform and GitHub Actions to deploy to AWS.](https://skundunotes.com/2023/03/07/ci-cd-with-terraform-and-github-actions-to-deploy-to-aws/)
If you are interested in learning about how to create an external application load balancer with Amazon EC2 instances in a **private subnet**, check out the code in this repository: [add-aws-elb-ec2-private-subnet-terraform](https://github.com/kunduso/add-aws-elb-ec2-private-subnet-terraform) +
Later, I also automated the process of provisioning the resources using GitHub Actions pipeline and I discussed that in detail at -[CI-CD with Terraform and GitHub Actions to deploy to AWS.](https://skundunotes.com/2023/03/07/ci-cd-with-terraform-and-github-actions-to-deploy-to-aws/) +
If you are interested in learning about how to create an external application load balancer with Amazon EC2 instances in a **private subnet**, check out the code in this repository: [add-aws-elb-ec2-terraform](https://github.com/kunduso/add-aws-elb-ec2-terraform)
I also added **Infracost** estimates to this repository. You can checkout the monthly cost badge at the top of this ReadMe file with the cost details. If you are interested in learning about that, checkout my note on - [estimate AWS Cloud resource cost with Infracost, Terraform, and GitHub Actions.](https://skundunotes.com/2023/07/17/estimate-aws-cloud-resource-cost-with-infracost-terraform-and-github-actions/)
*Note: I did not include the concepts of creating the EC2 instances, or installing a certificate, or route53 in this note.* @@ -21,3 +23,5 @@ Ensure that the policy attached to the IAM role whose credentials are being used

Review the code including the [`terraform.yml`](./.github/workflows/terraform.yml) to understand the steps in the GitHub Actions pipeline. Also review the `terraform` code to understand all the concepts associated with creating an AWS VPC, subnets, internet gateway, route table, and route table association.
If you want to check the pipeline logs, click on the **Build Badge** (terrform-infra-provisioning) above the image in this ReadMe. +## License +This code is released under the Unlincse License. See [LICENSE](LICENSE). \ No newline at end of file