open-vault/enos/modules/shutdown_node/main.tf
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

26 lines
446 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
}
}
variable "node_public_ip" {
type = string
description = "Node Public IP address"
}
resource "enos_remote_exec" "shutdown_node" {
inline = ["sudo shutdown -H --no-wall; exit 0"]
transport = {
ssh = {
host = var.node_public_ip
}
}
}