opentofu/terraform/test-fixtures/graph-provisioners/main.tf
James Bardin 0b59f9cad2 fix provisioner tests
Add host where required in the test configs, and fix the mock to check
for a null connection.
2018-12-19 16:02:56 -05:00

34 lines
650 B
HCL

variable "foo" {
default = "bar"
description = "bar"
}
provider "aws" {}
resource "aws_security_group" "firewall" {}
resource "aws_instance" "web" {
ami = "${var.foo}"
security_groups = [
"foo",
"${aws_security_group.firewall.foo}"
]
provisioner "winrm" {
cmd = "echo foo"
}
provisioner "winrm" {
cmd = "echo bar"
}
}
resource "aws_load_balancer" "weblb" {
provisioner "shell" {
cmd = "add ${aws_instance.web.id}"
connection {
host = "localhost"
type = "magic"
user = "${aws_security_group.firewall.id}"
}
}
}