Skip to content

Commit

Permalink
adding userdata
Browse files Browse the repository at this point in the history
  • Loading branch information
JWanderema committed Mar 13, 2020
1 parent eb64259 commit 462dac6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions instances.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ resource "aws_instance" "tableau" {
associate_public_ip_address = false
monitoring = true

user_data = <<EOF
<powershell>
Rename-Computer -NewName "DEVELOPMENT" -Restart
[Environment]::SetEnvironmentVariable("S3_OPS_CONFIG_BUCKET", "${var.ops_config_bucket}/sqlworkbench", "Machine")
</powershell>
EOF

lifecycle {
prevent_destroy = true

Expand Down Expand Up @@ -36,10 +43,10 @@ resource "aws_instance" "tableau2" {
monitoring = true

user_data = <<EOF
<powershell>
Rename-Computer -NewName "TABLEAU-DEPLOYMENT" -Restart
[Environment]::SetEnvironmentVariable("S3_OPS_CONFIG_BUCKET", "${var.ops_config_bucket}/sqlworkbench", "Machine")
</powershell>
<powershell>
Rename-Computer -NewName "DEPLOYMENT" -Restart
[Environment]::SetEnvironmentVariable("S3_OPS_CONFIG_BUCKET", "${var.ops_config_bucket}/sqlworkbench", "Machine")
</powershell>
EOF

lifecycle {
Expand Down

0 comments on commit 462dac6

Please sign in to comment.