Last active
March 15, 2024 23:03
-
-
Save rybons/74ba1c89467e8d66b9f0d5cfae27704e to your computer and use it in GitHub Desktop.
user data terraform example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "template_file" "windows_script" { | |
template = "${file("${path.module}/templates/windows_script.ps1")}" | |
vars { | |
var1 = "${var.var1}" | |
} | |
} | |
resource "aws_instance" "myinstance" { | |
connection { | |
type = "winrm" | |
user = "${var.windows_user}" | |
password = "${var.windows_password}" | |
} | |
user_data = "${data.template_file.windows_script.rendered}" | |
[...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment