Skip to content

Commit

Permalink
Merge pull request #4 from Primus-Learning/Dev
Browse files Browse the repository at this point in the history
Dev into main new ami
  • Loading branch information
babah1139 authored Oct 21, 2024
2 parents 9fb5992 + d010aeb commit 20accee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion aws_migration/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ resource "aws_instance" "wordpress_instance" {
security_groups = [aws_security_group.wordpress_sg.id]
associate_public_ip_address = true

user_data = file("userdata.sh")

# user_data = file("userdata.sh")



tags = {
Name = "bloomscoach-instance"
Expand Down
2 changes: 1 addition & 1 deletion aws_migration/userdata.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
yum update -y
yum install -y httpd mysql php php-mysql
yum install -y httpd mysql php7.4 php-mysql
systemctl start httpd
systemctl enable httpd
cd /var/www/html
Expand Down
4 changes: 1 addition & 3 deletions aws_migration/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
variable "ami" {
description = "The AMI ID for the EC2 instance"
type = string
default = "ami-00f251754ac5da7f0"

default = "ami-0025c36cba2a6c3b9" # "ami-00f251754ac5da7f0"

}

Expand All @@ -16,5 +15,4 @@ variable "availability_zone" {
description = "The availability zone for the subnet"
type = string
default = "us-east-1a"

}

0 comments on commit 20accee

Please sign in to comment.