Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1b33d4b
Change instance type from t3.nano to t3a.small
narrowwaymoto Mar 21, 2026
972ed88
Merge pull request #1 from narrowwaymoto/narrowwaymoto-patch-1
narrowwaymoto Mar 21, 2026
2a6de31
Rename aws_instance resource from 'web' to 'M8g'
narrowwaymoto Mar 21, 2026
6f9c0fa
Change AWS instance type from t3a.small to t3.micro
narrowwaymoto Mar 21, 2026
3e4e9f3
Merge pull request #2 from narrowwaymoto/narrowwaymoto-patch-2
narrowwaymoto Mar 21, 2026
0c2fb4b
Uncomment instance_type variable definition
narrowwaymoto Mar 21, 2026
1b0f4bc
Merge pull request #3 from narrowwaymoto/narrowwaymoto-patch-3
narrowwaymoto Mar 21, 2026
6c44ad6
intial commit
narrowwaymoto Mar 21, 2026
ba92302
Create mainold.tf
narrowwaymoto Mar 21, 2026
de3fb47
Add AWS AMI data source and EC2 instance resource
narrowwaymoto Mar 21, 2026
b12e0ca
Refactor Terraform configuration for AWS resources
narrowwaymoto Mar 21, 2026
990e1f0
Refactor Terraform configuration for minimal web server
narrowwaymoto Mar 21, 2026
29e6545
Remove AWS AMI data source and instance resource
narrowwaymoto Mar 21, 2026
362adb3
Delete mainold.tf
narrowwaymoto Mar 21, 2026
94d81f8
Refactor main.tf for region change and cleanup
narrowwaymoto Mar 21, 2026
e6ef3a8
Remove redundant AWS provider region configuration
narrowwaymoto Mar 21, 2026
78cb24b
Change AWS provider region to us-west-1
narrowwaymoto Mar 21, 2026
7c20b13
Remove AWS provider block from main.tf
narrowwaymoto Mar 21, 2026
dbb7d62
Add AWS provider configuration to main.tf
narrowwaymoto Mar 21, 2026
805ae7c
Remove AWS provider configuration
narrowwaymoto Mar 21, 2026
ed6a82a
Modify AWS AMI data source and add EC2 instance
narrowwaymoto Mar 21, 2026
6bd2f44
Add AWS provider configuration for us-west-1 region
narrowwaymoto Mar 21, 2026
c9ad68f
Change AWS region from us-west-1 to us-east-1
narrowwaymoto Mar 21, 2026
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: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


data "aws_ami" "app_ami" {
most_recent = true

Expand All @@ -16,7 +18,7 @@ data "aws_ami" "app_ami" {

resource "aws_instance" "web" {
ami = data.aws_ami.app_ami.id
instance_type = "t3.nano"
instance_type = var.instance_type

tags = {
Name = "HelloWorld"
Expand Down
12 changes: 6 additions & 6 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#output "instance_ami" {
# value = aws_instance.web.ami
#}
output "instance_ami" {
value = aws_instance.web.ami
}

#output "instance_arn" {
# value = aws_instance.web.arn
#}
output "instance_arn" {
value = aws_instance.web.arn
}
8 changes: 6 additions & 2 deletions providers.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}

required_version = ">= 1.3.0"
}

provider "aws" {
region = "us-west-2"
region = "us-east-1"
}


8 changes: 4 additions & 4 deletions 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"
#}
variable "instance_type" {
description = "Type of EC2 instance to provision"
default = "t3.nano"
}