mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Update AWS Terraform
- Add variables to cloud-init.yaml - Allow to set Linux OS password via cloud-init - Pass the tpot.conf file as inline content to allow variables - Remove obsolete tpot.conf file in terraform/ directory
This commit is contained in:
@ -60,7 +60,7 @@ resource "aws_instance" "tpot" {
|
||||
volume_size = 128
|
||||
delete_on_termination = true
|
||||
}
|
||||
user_data = "${file("../cloud-init.yaml")} content: ${base64encode(file("../tpot.conf"))}"
|
||||
user_data = templatefile("../cloud-init.yaml", {timezone = var.timezone, password = var.linux_password, tpot_flavor = var.tpot_flavor, web_user = var.web_user, web_password = var.web_password})
|
||||
vpc_security_group_ids = [aws_security_group.tpot.id]
|
||||
associate_public_ip_address = true
|
||||
}
|
||||
|
@ -52,3 +52,29 @@ variable "ec2_ami" {
|
||||
"us-west-2" = "ami-030a304a76b181155"
|
||||
}
|
||||
}
|
||||
|
||||
# cloud-init configuration
|
||||
variable "timezone" {
|
||||
default = "UTC"
|
||||
}
|
||||
|
||||
variable "linux_password" {
|
||||
#default = "LiNuXuSeRPaSs#"
|
||||
description = "Set a password for the default user"
|
||||
}
|
||||
|
||||
# These will go in the generated tpot.conf file
|
||||
variable "tpot_flavor" {
|
||||
default = "STANDARD"
|
||||
description = "Specify your tpot flavor [STANDARD, SENSOR, INDUSTRIAL, COLLECTOR, NEXTGEN]"
|
||||
}
|
||||
|
||||
variable "web_user" {
|
||||
default = "webuser"
|
||||
description = "Set a username for the web user"
|
||||
}
|
||||
|
||||
variable "web_password" {
|
||||
#default = "w3b$ecret"
|
||||
description = "Set a password for the web user"
|
||||
}
|
||||
|
Reference in New Issue
Block a user