Skip to content

Commit

Permalink
cleaning up user_data and added base64encode (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachreborn authored Nov 1, 2024
1 parent bc7ff4c commit 255cba6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/aws/vendor/velocloud/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ resource "aws_instance" "ec2_instance" {
monitoring = var.monitoring
volume_tags = merge(var.tags, ({ "Name" = format("%s%d", var.instance_name_prefix, count.index + 1) }))
tags = merge(var.tags, ({ "Name" = format("%s%d", var.instance_name_prefix, count.index + 1) }))
user_data = var.user_data != null ? var.user_data : templatefile("${path.module}/user_data.tftpl", {
user_data = var.user_data != null ? var.user_data : base64encode(templatefile("${path.module}/user_data.tftpl", {
velocloud_activation_key = var.velocloud_activation_key
velocloud_ignore_cert_errors = var.velocloud_ignore_cert_errors
velocloud_orchestrator = var.velocloud_orchestrator
})
}))

metadata_options {
http_endpoint = var.http_endpoint
Expand Down
5 changes: 1 addition & 4 deletions modules/aws/vendor/velocloud/user_data.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ velocloud:
vce:
vco: ${velocloud_orchestrator}
activation_code: ${velocloud_activation_key}
vco_ignore_cert_errors: ${velocloud_ignore_cert_errors}

runcmd:
- echo "Velocloud vEdge Successfully Configured"
vco_ignore_cert_errors: ${velocloud_ignore_cert_errors}

0 comments on commit 255cba6

Please sign in to comment.