Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudymax authored Sep 19, 2023
1 parent 9e9a3e9 commit 5e0e704
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ module "environment-base" {

}

data template_file "this" {
template = file("./${var.userdata_path}")

vars = {
HOSTNAME = var.hostname
USERNAME = var.username
GITHUB_USERNAME = var.github_username
AWS_ACCESS_KEY_ID = var.aws_access_key_id
AWS_SECRET_ACCESS_KEY = var.aws_secret_access_key
REGION = var.region
}
}

module "scale-set" {

source = "github.com/cloudymax/modules-azure-tf-scale-set"
Expand All @@ -72,7 +85,7 @@ module "scale-set" {
ultra_ssd_enabled = false
scale_in_rule = "NewestVM"
scale_in_force_deletion_enabled = true
cloud_init_path = "cloud-init.yaml"
cloud_init_path = "${var.userdata_path}"
vm_admin_username = local.admin_identity
vm_name_prefix = "${local.environment}-"
vm_network_interface = "vm-nic"
Expand Down

0 comments on commit 5e0e704

Please sign in to comment.