Skip to content

Commit

Permalink
Terraform items
Browse files Browse the repository at this point in the history
  • Loading branch information
ausmaster committed Sep 24, 2024
1 parent 41079e8 commit b352bd9
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
Binary file added .github/workflows/.pylintrc
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
/cloud/.terraform/
/cloud/.terraform.lock.hcl
/cloud/terraform.tfstate
/cloud/terraform.tfstate.backup
13 changes: 13 additions & 0 deletions cloud/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
provider "aws" {
profile = "default"
region = var.region
}

resource "aws_instance" "vuln_vault_server" {
ami = "ami-08012c0a9ee8e21c4"
instance_type = var.ec2_instance_type

tags = {
Name = var.instance_name
}
}
9 changes: 9 additions & 0 deletions cloud/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "instance_id" {
description = "ID of EC2 Instance"
value = aws_instance.vuln_vault_server.id
}

output "instance_public_ip" {
description = "Public IP address of EC2 instance"
value = aws_instance.vuln_vault_server.public_ip
}
3 changes: 3 additions & 0 deletions cloud/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
region = "us-west-1"
instance_name = "VulnVaultServer"
ec2_instance_type = "t2.micro"
17 changes: 17 additions & 0 deletions cloud/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable "region" {
description = "Region of the EC2 instances"
type = string
default = "us-west-1"
}

variable "instance_name" {
description = "Name tag for EC2 instance"
type = string
default = "VulnVaultInstance"
}

variable "ec2_instance_type" {
description = "EC2 instance type"
type = string
default = "t2.micro"
}
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
disable_error_code = no-redef

0 comments on commit b352bd9

Please sign in to comment.