From fee0a2b205d813b2309ef55f673398d0516d653c Mon Sep 17 00:00:00 2001 From: iganbold Date: Sun, 6 Sep 2020 10:28:07 -0700 Subject: [PATCH] Add iam_instance_profile --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index 44d1af3..8fdc4e2 100644 --- a/main.tf +++ b/main.tf @@ -6,6 +6,7 @@ resource "aws_instance" "this" { ami = "ami-06b263d6ceff0b3dd" instance_type = "t2.micro" subnet_id = var.subnet_id + iam_instance_profile = var.iam_instance_profile user_data = data.template_file.user_data.rendered associate_public_ip_address = true diff --git a/variables.tf b/variables.tf index a6c39e3..dc17709 100644 --- a/variables.tf +++ b/variables.tf @@ -3,6 +3,12 @@ variable "subnet_id" { description = "The VPC Subnet ID to launch in." } +variable "iam_instance_profile" { + type = string + description = "The IAM Instance Profile to launch the instance with." + default = null +} + variable "attacker_ip" { type = string description = "The attacker IP to create a reverse shell from AWS EC2 instance."