mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
e524d1eb95
This test is intended to be an easy-to-maintain catalog of good examples that we can use to catch certain parsing or decoding regressions easily. It's not a fully-comprehensive test since it doesn't check the result of decoding, instead just accepting any decode that completes without errors. However, an easy-to-maintain test like this is a good complement to some more specialized tests since we can easily collect good examples over time and just add them in here.
43 lines
632 B
HCL
43 lines
632 B
HCL
resource "aws_security_group" "firewall" {
|
|
lifecycle {
|
|
create_before_destroy = true
|
|
prevent_destroy = true
|
|
ignore_changes = [
|
|
description,
|
|
]
|
|
}
|
|
|
|
connection {
|
|
host = "127.0.0.1"
|
|
}
|
|
|
|
provisioner "local-exec" {
|
|
command = "echo hello"
|
|
|
|
connection {
|
|
host = "10.1.2.1"
|
|
}
|
|
}
|
|
|
|
provisioner "local-exec" {
|
|
command = "echo hello"
|
|
}
|
|
}
|
|
|
|
resource "aws_instance" "web" {
|
|
ami = "ami-1234"
|
|
security_groups = [
|
|
"foo",
|
|
"bar",
|
|
]
|
|
|
|
network_interface {
|
|
device_index = 0
|
|
description = "Main network interface"
|
|
}
|
|
|
|
depends_on = [
|
|
aws_security_group.firewall,
|
|
]
|
|
}
|