Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging with 03_07 #190

Open
wants to merge 22 commits into
base: 03_07
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
Copyright 2022 LinkedIn Corporation
Copyright 2023 LinkedIn Corporation
All Rights Reserved.

Licensed under the LinkedIn Learning Exercise File License (the "License").
See LICENSE in the project root for license information.

ATTRIBUTIONS:
[PLEASE PROVIDE ATTRIBUTIONS OR DELETE THIS AND THE ABOVE LINE “ATTRIBUTIONS”]

Please note, this project may automatically load third party code from external
repositories (for example, NPM modules, Composer packages, or other dependencies).
If so, such third party code may be subject to other license terms than as set
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Learning Terraform
This is the repository for the LinkedIn Learning course `Learning Terraform`. The full course is available from [LinkedIn Learning][lil-course-url].
This is the repository for the LinkedIn Learning course Learning Terraform. The full course is available from [LinkedIn Learning][lil-course-url].

![Learning Terraform][lil-thumbnail-url]

Terraform is a DevOps tool for declarative infrastructure—infrastructure as code. It simplifies and accelerates the configuration of cloud-based environments. In this course, instructor Josh Samuelson shows how to use Terraform to configure infrastructure and manage resources with Amazon Web Services (AWS). After demonstrating how to set up AWS for Terraform, Josh covers how Terraform manages your infrastructure, as well as how to use core Terraform commands. He also delves into more advanced topics, including how to leverage code modules from the Terraform registry and how to create your own modules. Upon wrapping up this course, you'll have the knowledge you need to efficiently define and manage infrastructure with this powerful tool.

_See the readme file in the main branch for updated instructions and information._
## Instructions
Expand All @@ -10,8 +14,15 @@ The branches are structured to correspond to the videos in the course. The namin

The `main` branch contains the starting code for the course and the `final` branch contains the completed code.

[0]: # (Replace these placeholder URLs with actual course URLs)
### Instructor

Josh Samuelson

DevOps Engineer



[lil-course-url]: https://www.linkedin.com/learning/
[lil-thumbnail-url]: http://
Check out my other courses on [LinkedIn Learning](https://www.linkedin.com/learning/instructors/josh-samuelson).

[lil-course-url]: https://www.linkedin.com/learning/learning-terraform-15575129?dApp=59033956
[lil-thumbnail-url]: https://cdn.lynda.com/course/3087701/3087701-1666200696363-16x9.jpg
18 changes: 2 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,14 @@ data "aws_ami" "app_ami" {
owners = ["979382823631"] # Bitnami
}

data "aws_vpc" "default" {
default = true
}

resource "aws_instance" "blog" {
ami = data.aws_ami.app_ami.id
instance_type = var.instance_type
vpc_security_group_ids = [module.blog_sg.security_group_id]

tags = {
Name = "Learning Terraform"
}
}

module "blog_sg" {
source = "terraform-aws-modules/security-group/aws"
version = "4.13.0"

vpc_id = data.aws_vpc.default.id
vpc_id = module.blog_vpc.vpc_id
name = "blog"
ingress_rules = ["https-443-tcp","http-80-tcp"]
ingress_cidr_blocks = ["0.0.0.0/0"]
egress_rules = ["all-all"]
egress_cidr_blocks = ["0.0.0.0/0"]
}
}
2 changes: 1 addition & 1 deletion providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ terraform {
}

provider "aws" {
region = "us-west-2"
region = "ap-southeast-2"
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "instance_type" {
description = "Type of EC2 instance to provision"
default = "t3.nano"
}
}