Skip to content
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
59 changes: 59 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions files/deploy_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cat << EOM > /var/www/html/index.html
<center><img src="http://${PLACEHOLDER}/${WIDTH}/${HEIGHT}"></img></center>
<center><h2>Meow World!</h2></center>
Welcome to ${PREFIX}'s app. Replace this text with your own.
Yo something has changed by someone, what to do ?
<!-- END -->

</div>
Expand Down
14 changes: 8 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ terraform {
}

provider "aws" {
region = var.region
region = var.region
}

resource "aws_vpc" "hashicat" {
cidr_block = var.address_space
enable_dns_hostnames = true

tags = {
name = "${var.prefix}-vpc-${var.region}"
name = "${var.prefix}-vpc-${var.region}"
environment = "Production"
}
}
Expand All @@ -39,21 +39,21 @@ resource "aws_security_group" "hashicat" {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
cidr_blocks = ["15.248.2.24/32"]
}

ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
cidr_blocks = ["15.248.2.24/32"]
}

ingress {
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
cidr_blocks = ["15.248.2.24/32"]
}

egress {
Expand Down Expand Up @@ -127,7 +127,9 @@ resource "aws_instance" "hashicat" {
vpc_security_group_ids = [aws_security_group.hashicat.id]

tags = {
Name = "${var.prefix}-hashicat-instance"
Name = "${var.prefix}-hashicat-instance"
Department = "devops"
Billable = "true"
}
}

Expand Down
9 changes: 9 additions & 0 deletions remote_backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "remote" {
hostname = "app.terraform.io"
organization = "moizshar"
workspaces {
name = "hashicat-aws"
}
}
}
5 changes: 0 additions & 5 deletions terraform.tfvars.example

This file was deleted.