Skip to content

Commit b06d139

Browse files
Added Inline Comments
1 parent f30a14f commit b06d139

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

Diff for: .gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Exclude .git and .terraform files
12
**/.git
23
**/.terraform
34

@@ -16,6 +17,9 @@ crash.*.log
1617
key-pair
1718
key-pair.pub
1819

20+
# Exclude tf.out file
21+
tf.out
22+
1923
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
2024
# password, private keys, and other secrets. These should not be part of version
2125
# control as they are data points which are potentially sensitive and subject
@@ -39,4 +43,4 @@ override.tf.json
3943
# Ignore CLI configuration files
4044
.terraformrc
4145
terraform.rc
42-
.terraform.lock.hcl
46+
.terraform.lock.hcl

Diff for: ec2.tf

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
2-
resource "aws_instance" "ec2-instance-13-sep-2022" {
1+
# Create AWS EC2 Instance
2+
resource "aws_instance" "ec2-instance" {
33

44
ami = lookup(var.AMI, var.AWS_REGION)
55
instance_type = "t2.micro"
@@ -27,6 +27,7 @@ resource "aws_instance" "ec2-instance-13-sep-2022" {
2727

2828
}
2929

30+
# Make nginx.sh file into an Executable and Run the .sh file
3031
provisioner "remote-exec" {
3132

3233
inline = [

Diff for: provider.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# Download the provider files for AWS
22
terraform {
33

44
required_providers {

Diff for: public-ip.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
35.176.114.175
1+
35.176.180.40

Diff for: variables.tf

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#File to Input the Variables that will be used across all .tf files
12

23
variable "AWS_REGION" {
34

Diff for: vpc.tf

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Create the VPC
2+
13
resource "aws_vpc" "prod-vpc" {
24

35
cidr_block = "10.0.0.0/16"

0 commit comments

Comments
 (0)